| || |
Not able to get the test steps to TestRunner
I have been trying to run the test using Selenium. I could do it when I run it normally but failed when I tried to run it using TestRunner.
I got information regarding running the test using TestRunner from the link below. But I am not able to get the test steps in the browser and thus not able to run it. (as per the instructions it says: "The middle (screen) should show the table values of the current test")
If anyone has tried it please let me know. Please refer the link/info below
Automating Selenium IDE
To automate your tests there are a few things you need to do. First of all you need to make sure all the tests you made in Selenium IDE are saved as .html files. You can do this by going to each of your test files and renaming them to have a .html file extension. Or you can save your test as an html file when you create it.
Now, in the directory of all your tests, you need to make an html file called TestSuite.html (it can be called whatever you want but here I'm going to use TestSuite.html). This file should contain a simple array of links to each of your test html's. An example is shown below.
<td>Test suite for the whole application</td>
<td><a target="testFrame" href="test_main_page.html" >Access main page</a></td>
<td><a target="testFrame" href="test_login.html" >Login to application</a></td>
<td><a target="testFrame" href="test_address_change.html" >Change address</a></td>
<td><a target="testFrame" href="test_logout.html" >Logout from application</a></td>
Remember TestSuite.html should be kept in the same directory as all your tests. Obviously you will need to add new array rows, and change the html links as necessary, depending on your test html filenames and the number of tests you want to run.
Be sure to add the target="testFrame', or else Selenium won't be able to run your tests. This will force the tested pages to be opened in the bottom frame of the test window, so you can watch.
Now open Firefox, but not Selenium IDE. We are going to invoke Selenium Core, which runs as a sort of web application. In your browser, copy the following line and paste it into the address bar:
Read the url, and replace dir/testsuite.html with the true directory and filename where your test suite is. Also replace http://localhost with the baseURL of your server, that is http://deklarantT.ru in my case.
Now you will see a new screen with 4 frames. The leftmost one should display the tables as described in your TestSuite.html file. The middle should show the table values of the current test, and the rightmost should show the commands available. Now you can click on the links of your tests in the leftmost window and run them using 'run selected' or you can run all the tests. Bear in mind that if a test fails, you will have to run the test on its own to see exactly where it has failed. For this reason it is important to make tests that in the test teardown phase, nullifies all the changes made in the setup phase. This will allow your tests to run properly while leaving the state of the program in the same way that it was found.