Page 1 of 1

Problem to integrate into Selenium

Posted: 2009-09-16 4:10 pm
by joker
I want to use jscoverage-server with --proxy option to run selenium tests. I integrated well the jscoverage-server into the project, because when I started to run one test then it is run successfully. But the problem is when I ran more than one test, then the first test is ran successfully but the other tests didn't ran. The error messages which I got were diverse s in the FF3 error console. For example the js code which are asked from the server via the proxy has error.

Please help me...

Re: Problem to integrate into Selenium

Posted: 2009-09-17 6:13 pm
by velo.br@gmail.com
Hi Joker,

FWIW, I have being doing selenium test instrumenting the js before testing, worked very well..... but I got problems with proxy server



VELO

Re: Problem to integrate into Selenium

Posted: 2009-09-18 8:01 am
by Guest
Hy Velo,

Thanks for you answer. So I got problem with the proxy-server, because I had a lot of java script files, more than 500. I think much about this problem and I think so that the parse is ok, because always I got this error when the page are loaded the all included 500 java script files. The proxy don't work well with many files, crash down although he continues to work.

So I decided to merge the all js files into a file(or files). But this file(or files) will not contains more then 65535 line because the jscovarage parse doesn't can't parse that file, break down with a error. I hope that solution will be work, I will write the result here.

Re: Problem to integrate into Selenium

Posted: 2009-09-24 12:37 pm
by Guillaume Lung
Hi !
I use selenium and jscoverage with the proxy without any issue.

BTW, each test starts with an "open" and erase all the jscoverage statistics from the previous test. Do you know if there is a way to add all the coverage statistics when running a test suite (and after the selenese "open") ?

Re: Problem to integrate into Selenium

Posted: 2009-09-24 2:08 pm
by Guillaume Lung
It might be possible to add a javascript user-extension to selenium and exceute the following code at the end of each test (as described in the documentation).

Code: Select all

jscoverage_report();

But this means that a manual merged must be done for each test, no ?

Re: Problem to integrate into Selenium

Posted: 2009-09-25 4:09 pm
by Ed
Calling jscoverage_report() should merge the current coverage data with any coverage data already stored in the report directory.