8 Answers, 1 is accepted
You can use the option RecycleBrowser in the test list settings (see RecycleBrowser screenshot) this way only once instance of the browser will be launched and recycled through the entire test list execution.
However please note that this is not a good practice of organizing your tests in a test list. In the long run it’s better to eliminate such test dependencies i.e. test 2 must run after test 1 - the login test. It is a much better practice to make each test independent and standalone such that you can run that individual test all by itself and not worry that it must run after something else. Yes this means every test must go through a login process.
In this case you can use if...else logical step which will check if you are logged in already and if yes do not log you again. Please refer to the screenshot login if needed for more information.
Ivaylo
Telerik
and send us your feedback! Expires mid-August!
In my First test code is there for login and some other steps.and second,third i deleted login steps but other steps are there .these three i kept in testlist and set the browser settings as RecycleBrowser .But in test list first test is running,for second test browser is opening but not running.with single login i need to run remain tests.How can i do that.
Thanks
I tried with the recyclebrowser option .But it is not working as my requirement.
RecycleBrowser - when set to true, one instance of the browser is launched and recycled throughout all tests until Manager.Dispose is called. Note: This setting is not supported in 2013 R1.
Is there another way around this as we use the same test scripts with different logins who have different permissions. We did not expect this feature to be removed.
I am quite surprised the Recycle Browser is not working for you, it should work in this case. Please note that you can always create the common login with the if else step I described in my initial reply.
That should work in your case.
Ivaylo
Telerik
The option is still available and it is placed in the same location, please refer to the screenshot attached.
Regards,Ivaylo
Telerik
This is what we found:-
RecycleBrowser - when set to true, one instance of the browser is launched and recycled throughout all tests until Manager.Dispose is called. Note: This setting is not supported in 2013 R1.
If the first test in a test list logs in - then subsequent test scripts (require that login) do various different processes the browser does not stay open and subsequent test scripts fail. This was working yesterday before the update.
I have did some testing and it seems the feature is not working as expected, I have logged a bug which you can find using this public URL.
Thank you for your understanding.
Ivaylo
Telerik