Get help with testing, discuss unit testing strategies etc.


Post by ankgkp »

Hi,
I'm having trouble testing against multiple browser with Selenium. I already follow the instructions in the API documentation but all I'm getting is the same blank page in many different browsers after execute:
selenium https://localhost/siesta/examples/010-basics/index.html
I'm looking at a "Show log" button and a "Command History" panel, but no test results. Please tell me what I'm missing. I'm trying to convince my boss to purchase Siesta as a unit testing tool for our default embedded web application, which is written in EXT JS.
Thank you!

Post by nickolay »

First make sure you can launch the test suite in browser by pointing it to https://localhost/siesta/examples/010-basics/index.html

The results from automation script will appear in the console, from which you've launched the command. Also try to launch the suite in single browser, using the "--browser=firefoxproxy" switch for example

Post by ankgkp »

Thanks a lot for the quick reply. The test suite launches just fine from the browser. Apparently, it'd work with single browser when I added --browser firefoxproxy. But doesn't testing it this way ruin the whole purpose of testing against multiple browsers simultaneously? I understand that if we do not specify the browser, it'd accept the wild card by default.

Post by nickolay »

Ok, try also running with all browsers (w/o --browser switch) but in sequential mode: bin/selenium URL --sequential

It will run the tests in all browsers, but one by one - should lower the CPU load.

Post by ankgkp »

Still no luck with --sequential. It still launches all my browsers and get stuck there. Also, I get a "No Browser browsercontext" with --browser=googlechrome. I thought it might have been because the Selenium RC package was not up-to-date (2.15.00) so I replaced it with the latest one (2.16.01) but still no luck.

Post by nickolay »

ankgkp wrote:Still no luck with --sequential. It still launches all my browsers and get stuck there.
Yes, currently it will open all browsers first, but the test suite will be ran in them sequentially. We'll fix that it will only one browser at a time in next release.

Are you sure it stucks? It might take some time before it will run the suite in all browsers. Also the script should interrupt itself after 3 minutes of inactivity in the test suite. Are you giving it at least 5 minutes to complete (per browser)?
ankgkp wrote:Also, I get a "No Browser browsercontext" with --browser=googlechrome.
About "No Browser browsercontext" - this is a typo, sorry, should read "No supported browsers". Fixed it. If you have Chrome installed, make sure its installed in the default location. Also check the spelling of "googlechrome" - even single letter may cause this message.
ankgkp wrote:I thought it might have been because the Selenium RC package was not up-to-date (2.15.00) so I replaced it with the latest one (2.16.01) but still no luck.
Selenium is at 2.15.0 intentionally. 2.16.0 has broken *iexploreproxy (haven't check 2.16.01).

Please try again with this information, if you still will have any troubles, lets follow up tomorrow.

Post by ankgkp »

I've tried --sequential again and this time I really took my time. I went to lunch for half an hour and came back, but all the browsers were still opened and nothing shows up in the console. I'm executing these tests on a i7 quad core with 12GB DDR3 RAM, so I don't think resources are the problem. I also ran into another bug testing example 025-extjs-mvc with IE 8 though. I keep getting this error "Ext.onReady took longer than 10 seconds to response" for the 014_app.t.js test suite. I have tried a few different ways to set the timeout including extending the test class.
Class('AM.MyTestClass', {
isa: Siesta.Test.ExtJS,
waitForTimeout: 20000 //this throws an unknown builder in Firebug
});
I also add this to the Harness.configure:
testClass : AM.MyTestClass
I still can't get it to work with the above code yet. However I think Siesta is very impressive. I just need to resolve these little glitches before presenting it to my boss at the team meeting. Thank you!

Post by ankgkp »

Besides, is there an option to save or output all the test logs and result onto an Excel file? or at least a text file to keep track of the test history.

Thank you

Post by nickolay »

ankgkp wrote:Besides, is there an option to save or output all the test logs and result onto an Excel file? or at least a text file to keep track of the test history.

Thank you
Yes, you can redirect the output to the file with >:

bin/selenium URL > file.txt

About your troubles - lets talk in our IRC channel and solve them: https://www.bryntum.com/chat/

In what timezone are you?

Post Reply