Hudson installation and use

1. Download hudson:

http://mirror.bit.edu.cn/eclipse/hudson/war/hudson-3.1.0.war

2. Install jdk: /.jdk-6u33-linux-x64.bin, configure environment variables

3. Run java -jar hudson-3.1.0.war directly, and access http://ip:8080 directly from the browser, as shown below

4. Configure slave

      System Management -> Management Node -> New Node

5. Install the robotframework plugin on Jenkins:

https://wiki.jenkins-ci.org/display/JENKINS/Robot+Framework+Plugin

 

6. After opening, see the Jenkins home page and enter the plugin management to install the Jenkins Xvfb plugin plugin

 This is a related introduction to the Xvfb plugin (which can be understood as a container that hosts the running case on Jenkins to start the browser):

https://github.com/zregvart/xvfb-jenkins-plugin

https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin

This interface is similar to tomcat's local startup.

Note:

Use Xvfb (X Windows Virtual Frame Buffer): If you want to run Selenium on a Unix server- without an X Windows display- or if you just don't want to see the web browser windows popping up, use xvfb. This is an X server that just runs in memory, without a display.

 

Original source: http://wiki.openqa.org/display/SRC/Selenium-RC+and+Continuous+Integration

     

 

Encounter problems:

1. Disk space is too low. Only 0.786GB left.

 Just set the Free Space Threshold to a small value in System Management -> Management Node -> Settings.

2. Set slave and master: 

https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines

3. When the slave is set to windows mode, select the startup mode as "Lauch slave agents via JNLP", but when running "javaws slave-agent.jnlp", the error "illegal tunneling parameter" is reported. After searching, it is found that it is the jvm on the agent side If the version is low, it cannot be started, and it can be upgraded to java7. Or you can not upgrade to 7, use the second method to "

java -jar slave.jar -jnlpUrl http://master_ip:port/computer/slave_ip/slave-agent.jnlp

" to run. Just download slave.jar and slave-agent.jnlp on the slave machine.

4. When the slave is set to windows, because the default encoding method of windows is GBK, the running log generated in the console will appear garbled when the master is linux (encoding method is UTF-8). The default encoding format is changed to UTF-8 (http://blog.sina.com.cn/s/blog_75ad10100101n96t.html), but it still doesn't work. You can only convert the log under mater to UTF-8 format (refer to http://www.myexception.cn/linux-unix/1171574.html, replace it with iconv), and then in the console's "view as plain txt" "You can see the refreshing Chinese. Batch script processing is as follows:

find /root/.hudson/jobs/AutomationForEnginTest/builds -type f -name log -exec cp  {} {}.old \;
find /root/.hudson/jobs/AutomationForEnginTest/builds -type f -name log -exec iconv -f GBK -t UTF-8 {} -o {}.new \;
find /root/.hudson/jobs/AutomationForEnginTest/builds -type f -name log -exec mv {}.new {} \;

5. When the node is linux, in addition to the first [Launch slave agents on Unix machines via SSH], it can also be run through [Launch slave agents via Java Web Start], which is suitable for all systems that support Java programs . Like windows, download slave.jar and slave-agent.jnlp from Hudson and run java -jar slave.jar -jnlpUrl http://jenkins_ip:jenkinsPort/jenkins/computer/workname/slave- agent.jnlp Disadvantage: If the node goes down, the master node cannot restart it automatically. The following is this parameter configuration:

      1) Tunnel connection through: [Optional] Used in the case of port forwarding

      2) JVM options: [optional] JVM optional parameters

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326751802&siteId=291194637