none
Cross-Browser testing on Chrome failing for Ordered Tests RRS feed

  • Question

  • I have an ordered test that I want to run on Chrome. I have installed all the required Cross-Browser components and have also successfully run a single test method on Chrome.

    The issue comes when I try to run an ordered test instead of a single method on chrome. The first test-method of the ordered test runs absolutely fine and once control leaves the first method the browser closes, never going to the second method in the ordered test. So basically I'm not able to run an ordered test. The browser closed after proper execution till the last line in first method, without any exceptions.

    If i debug instead of run, i get the message "Service Not Found: DriverService.cs not found" on the very last line of the first method in any ordered test i run.

    DriverService.cs not found
    
    You need to find DriverService.cs to view the source for the source for the current call stack frame 
    
    You can view disassembly in the Disassembly Window. To always view disassembly for missing source files, change the setting in the options dialog.
    
    Source Search information
    Locating source for 'c:\Projects\webdriver\dotnet\src\webdriver\DriverService.cs'. (No checksum.)
    The file 'c:\Projects\webdriver\dotnet\src\webdriver\DriverService.cs' does not exist.
    Looking in script documents for 'c:\Projects\webdriver\dotnet\src\webdriver\DriverService.cs'...
    Looking in the projects for 'c:\Projects\webdriver\dotnet\src\webdriver\DriverService.cs'.
    The file was not found in a project.
    Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\crt\src\'...
    Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\crt\src\vccorlib\'...
    Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\src\mfc\'...
    Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\src\atl\'...
    Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include'...
    The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\Projects\webdriver\dotnet\src\webdriver\DriverService.cs.
    The debugger could not locate the source file 'c:\Projects\webdriver\dotnet\src\webdriver\DriverService.cs'.

    Lines of code for Chrome Run:

    BrowserWindow.CurrentBrowser = "Chrome";
    BrowserWindow window = BrowserWindow.Launch(new Uri(url));
    

    I did a lot of check-up on how to overcome this or if ordered test can be actually supported for a run on chrome, but i am at a dead-end.

    Has anyone implemented running an ordered using cross browser testing on chrome from vs before ? Is there anyway to prevent the browser from closing in-between tests ?

    VS Version: VS2013 Premium, Update 5. Chrome Version: Version 45.0.2454.93



    • Edited by Anoo7 Monday, September 21, 2015 10:47 AM
    Monday, September 21, 2015 10:17 AM

All replies

  • Hi Anoo7,

    >>Has anyone implemented running an ordered using cross browser testing on chrome from vs before ? Is there anyway to prevent the browser from closing in-between tests ?

    Sorry for that I have no the third party browser in my side, but just to make this issue clearly, could you run your ordered test in the default IE browser? If it still has this issue, it means that the real issue is not related to the browser or the test method, the real issue is related to the ordered test.

    In addition, whether method 2 use the browser window created in method 1? I mean that whether the two methods have the dependency relationship?

    If so, maybe  CloseOnPlaybackCleanup property would be helpful for you.

    http://blogs.msdn.com/b/visualstudioalm/archive/2012/11/08/using-same-applicationundertest-browserwindow-across-multiple-tests.aspx

    Not very sure that what your detailed test methods are, but it seems that it could find the .cs file in a specific path, could you find this file before the test method 2 starts?

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, September 23, 2015 9:43 AM
    Moderator
  • Hi Jack,

    Thank you for the reply.

    >> could you run your ordered test in the default IE browser? 

    Yes, I  run my ordered test in IE, and it ran absolutely fine. So i'm positive its not the ordered test. I'm trying to run the ordered test on chrome by using Selenium Cross Browser components.

    Also the issue "DriverService.cs" only occurs when i try and debug my test on chrome, so i got the cs file, placed it in the location mentioned and it still fails (due to a method "dispose()" in that cs file  - which releases all the resources associated). So i'm at a dead end with the driver.cs approach. i tried altering the method to suit needs and still it didn't work.

    >> I mean that whether the two methods have the dependency relationship?

    The lines of code i mentioned above were added to a launch method so that the browser launched is chrome (when i choose chrome as the running browser in MTM).

    Ordered Test >contains> Method >contains> launch>contains> choosing of launch browser. So yes they are dependent.

    When my ordered test ran default in IE, it went from method 1 to method 2 in the ordered test without issues. The same flow isn't working in chrome.

    >> CloseOnPlaybackCleanup  

    I've used this as well, and it does not work for chrome as per cross browser testing, works only for IE.

    >>could you find this file before the test method 2 starts?

    yes the detection of this file happens toward the end of the first method (note: only on debug this file is asked. on run, browser closes towards the end of the method)

    So I want to know how to run an ordered test(which ran successfully in IE) in chrome using cross browser testing. 

    I've only been able to run single methods in chrome without issues but not ordered tests and i need to run ordered tests.

    Thanks,

    Anoohya


    • Edited by Anoo7 Wednesday, September 23, 2015 12:23 PM
    Wednesday, September 23, 2015 12:19 PM
  • Hi Anoohya,

    Thanks for your friendly response.

    >>Yes, I  run my ordered test in IE, and it ran absolutely fine. So i'm positive its not the ordered test. I'm trying to run the ordered test on chrome by using Selenium Cross Browser components.

    If so, I doubt that it would have a limitation for the speicfic third browser in ordered tests.

    Since this issue is related to this extension tool "Selenium components for Coded UI Cross Browser Testing", one idea is that you could click "Q AND A" in the following link, and then start a dicussion there: 

    https://visualstudiogallery.msdn.microsoft.com/11cfc881-f8c9-4f96-b303-a2780156628d

    Maybe we could better response from the extension experts.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 24, 2015 7:42 AM
    Moderator
  • Hi Jack,

    I posted a question/discussion in the link you provided and hopefully i'll have answers soon!

    Thanks,

    Anoohya

    Thursday, September 24, 2015 10:16 AM
  • Thank you for your support and co-operation, Anoohya:)

    Have a nice day,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 25, 2015 1:42 AM
    Moderator
  • I posted in the above link asking for a way but, if anyone does know a way, please do let me know. This is still to be answered.


    Thursday, October 1, 2015 4:27 AM