Marius Dumitru Florea wrote: > > Tharindu Madushanka wrote: >> Hi, >> >> I have completed sending loging / logout observation events and trying to >> write integration test for the task. I have written a test case similar to >> the attached file. I want to clear few things about it. As well as I got few >> issues while trying to run. >> >> *Question 1* - I think this test should check my observation event sending - >> Please comment on if there is any mistake on groovy script added to >> createPage() content. >> >> *Question 2 *- On running the selinium tests >> Test is named LoginObservationTest >> >> After writing the test case, For first time run, I went to >> /enterprise/distribution-test/selenium-tests directory and run the following >> command as in tutorial >> mvn install -Dpattern=LoginObservationTest >> >> It showed an error saying >> java.lang.RuntimeException: Firefox couldn't be found in the path! >> Please add the directory containing 'firefox-bin' to your PATH environment >> variable, or explicitly specify a path to Firefox like this: >> *firefox /blah/blah/firefox-bin >> >> Then I have linked the firefox folder as it was suggested in this >> http://willbryant.net/software/2008/05/26/selenium_rc_firefox_2_on_ubuntu_hardy >> But in my case I have firefox-3.0.10 and inside that I had firefox binary >> not a file named firefox-bin >> Then I linked to path like this. >> sudo ln /usr/lib/firefox-3.0.10/firefox /usr/lib/firefox/firefox-bin >> >> Now I get an exception like this when I run the command to test my selenium >> test :( > > Here's what I do: > > * add my test class to AllTests > * download and unpack FF2 > * change the firefox profile in the pom and put > > <browser>*firefox /path/to/firefox2/firefox-bin</browser>
It isn't that good to change the pom. I simply modify the PATH variable in the shell from which I run the tests. $ cd /path/to/selenium-tests/ $ PATH=/path/to/firefox2:$PATH $ mvn install -Dpattern=LoginObservationTest > * make sure MyTest#suite() method points to the right class > > This may not be the best setup but it sure works for me. > > Hope this helps, > Marius > >> ------------------------------------------------------- >> T E S T S >> ------------------------------------------------------- >> Running com.xpn.xwiki.it.selenium.AllTests >> 09:59:44,591 INFO [org.mortbay.util.Credential] Checking Resource aliases >> 09:59:44,602 INFO >> [org.openqa.selenium.server.SeleniumDriverResourceHandler] Command request: >> getNewBrowserSession[*firefox, http://localhost:8080, ] on session null >> 09:59:44,603 INFO [org.openqa.selenium.server.BrowserSessionFactory] >> creating new remote session >> 09:59:44,936 INFO [org.openqa.selenium.server.BrowserSessionFactory] >> Allocated session 775dad4fbed24b0e98a86c0652ec136c for http://localhost:8080, >> launching... >> 09:59:45,092 INFO >> [org.openqa.selenium.server.browserlaunchers.FirefoxCustomProfileLauncher] >> Preparing Firefox profile... >> Could not read application.ini >> 10:00:05,235 WARN [org.mortbay.http.HttpConnection] POST >> /selenium-server/driver/ HTTP/1.1 >> java.lang.RuntimeException: Timed out waiting for profile to be created! >> >> Kindly tell me some tips to solve this. -- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

