Selenium Integration in Builds


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Selenium Integration in Builds
# 8  
Old 08-14-2013
This User Gave Thanks to rajamadhavan For This Post:
# 9  
Old 08-23-2013
Hi

The link was very helpful and it was able to do most of the tasks.

If you see the build.xml :
Code:
  <target name="run">
                  <java jar="${RELEASE_ROOT}/lib/selenium-server-standalone-2.26.0.jar" fork="true">
  </target>

I was trying to run the selenium jar before compiling or running the tests. However on Running the build.xml via ant .....it gets stuck and doesnt move to compile. :

Output of Bash:

Code:
bash-3.2$ ant -f /files0/nlae_dev_atg/environment_build/scripts/envbuild/build-selenium.xml run-batch-test
Buildfile: /files0/nlae_dev_atg/environment_build/scripts/envbuild/build-selenium.xml

run:
     [java] Loading EUNumberFormatProvider
     [java] Loading EUDecimalFormatSymbols
     [java] Aug 23, 2013 6:29:52 AM org.openqa.grid.selenium.GridLauncher main
     [java] INFO: Launching a standalone server
     [java] 06:29:52.606 INFO - Java: Sun Microsystems Inc. 20.4-b02
     [java] 06:29:52.608 INFO - OS: Linux 2.6.18-348.el5 amd64
     [java] 06:29:52.620 INFO - v2.26.0, with Core v2.26.0. Built from revision 18041
     [java] 06:29:52.758 INFO - RemoteWebDriver instances should connect to: OpenX
     [java] 06:29:52.760 INFO - Version Jetty/5.1.x
     [java] 06:29:52.761 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
     [java] 06:29:52.762 INFO - Started HttpContext[/selenium-server,/selenium-server]
     [java] 06:29:52.762 INFO - Started HttpContext[/,/]
     [java] 06:29:52.793 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@744a6cbf
     [java] 06:29:52.793 INFO - Started HttpContext[/wd,/wd]
     [java] 06:29:52.797 INFO - Started SocketListener on 0.0.0.0:4444
     [java] 06:29:52.798 INFO - Started org.openqa.jetty.jetty.Server@29173ef
bash-3.2$ ant -f /files0/nlae_dev_atg/environment_build/scripts/envbuild/build-selenium.xml run-batch-test
Buildfile: /files0/nlae_dev_atg/environment_build/scripts/envbuild/build-selenium.xml

run:
     [java] Loading EUNumberFormatProvider
     [java] Loading EUDecimalFormatSymbols
     [java] Aug 23, 2013 6:31:38 AM org.openqa.grid.selenium.GridLauncher main
     [java] INFO: Launching a standalone server
     [java] 06:31:39.072 INFO - Java: Sun Microsystems Inc. 20.4-b02
     [java] 06:31:39.073 INFO - OS: Linux 2.6.18-348.el5 amd64
     [java] 06:31:39.085 INFO - v2.26.0, with Core v2.26.0. Built from revision 18041
     [java] 06:31:39.199 INFO - RemoteWebDriver instances should connect to: OpenX
     [java] 06:31:39.200 INFO - Version Jetty/5.1.x
     [java] 06:31:39.201 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
     [java] 06:31:39.202 INFO - Started HttpContext[/selenium-server,/selenium-server]
     [java] 06:31:39.202 INFO - Started HttpContext[/,/]
     [java] 06:31:39.216 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@210a6ae2
     [java] 06:31:39.217 INFO - Started HttpContext[/wd,/wd]
     [java] 06:31:39.221 INFO - Started SocketListener on 0.0.0.0:4444
     [java] 06:31:39.221 INFO - Started org.openqa.jetty.jetty.Server@29173ef

Cananybody help me on this:

How to run a jar file from build.xml so that the corresponding server is started and then it performs next steps?

Last edited by Scott; 09-27-2013 at 02:20 AM.. Reason: Code tags
# 10  
Old 08-23-2013
Can you close the tag and try ?

Code:
<target name="run">
                  <java jar="${RELEASE_ROOT}/lib/selenium-server-standalone-2.26.0.jar" fork="true">
</java>
  </target>

# 11  
Old 08-23-2013
Hi

Its still stuck after trying what you suggested. I guess I need to start it separately as a process. Any suggestions on this?
# 12  
Old 08-23-2013
No, start server/run tests/stop server should work within the same ant script.

refer this link and see if you are missing anything while defining targets

Automating Selenium testing with TestNG, Ant and CruiseControl | Hedley Proctor
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Linux

Selenium Integration

Hi People, I am trying to run Selenium Scripts on my server. System is a Linux Box and I am accessing it via Putty. I have some basic admin privileges for it. The Steps: 1. A build.xml has been created which has this o RELEASE_ROOT this has been set to the Java Project folder. o... (1 Reply)
Discussion started by: ankur328
1 Replies

2. UNIX for Dummies Questions & Answers

mkdir: cannot create directory `/builds/somedir/': Permission denied

Hi, I am trying to run a shell script which contains an mkdir command as part of the execution. The script fails with the following error: mkdir: cannot create directory `/builds/somedir/': Permission denied The user running the script is 'harry' and belongs to group 'school'.... (5 Replies)
Discussion started by: Technext
5 Replies

3. UNIX for Advanced & Expert Users

Difficulty building gcc 4.4.0 -- builds but fails abi_check

I'm trying to build gcc 4.4.0 in 64-bit (x86_64) Ubuntu 9.04, but make check fails. Specifically, make -k check-target gives (after many other pages of output): Running /home/charles/Desktop/gccsrc/libstdc++-v3/testsuite/libstdc++-abi/abi.exp ... FAIL: abi_check Running... (10 Replies)
Discussion started by: CRGreathouse
10 Replies

4. Shell Programming and Scripting

selenium in script

All, I am using chrome URL in shell script but auto=true is not working while run script. -Smoorthy (0 Replies)
Discussion started by: smoorthy
0 Replies
Login or Register to Ask a Question