Installing ReadyAPI on a Jenkins EC2 instance using X11

This includes the steps to get ReadyAPI (with licence) running on an AWS EC2 instance and the commands needed to run the Jenkins job 



  • Login via SSH as ec2-user 
  • Install Java x64 to /opt/jdk1.7.0_67/:

 sudo -s  
 cd /opt  
 wget http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u67-linux-x64.tar.gz  
 tar zxvf jdk-7u67-linux-x64.tar.gz  
 rm jdk-7u67-linux-x64.tar.gz  

  • Install X11 Virtual Frame Buffer (for running headless tests in Jenkins):

 sudo yum install xorg-x11-server-Xvfb  

  • Ensure X11 forwarding is enabled for SSH server:

 X11Forwarding yes  

  • Prepare the Ready! API install directory:

 sudo mkdir /data/app/ReadyAPI-1.3.1  
 sudo chown jenkins:jenkins /data/app/ReadyAPI-1.3.1  

  • Reconnect the server using the user that will be using Ready! API (in this case "jenkins") with X11 forwarding enabled on the client:

 ssh -X -i ~/.ssh/AmazonKeys.pem jenkins@{jenkins URL}  

  • Download the latest version of Ready! API to the server:

 wget http://dl.eviware.com/ready-api/1.3.1/ReadyAPI-x64-1.3.1.sh  
 Downloads can be found here http://support.smartbear.com/downloads/readyapi/  

  • Ensure that the installer is executable:

 chmod +x ReadyAPI-x64-1.3.1.sh  

  • Run the installer from the command line: (This will open the installer windows in your local X session)

 ./ReadyAPI-x64-1.3.1.sh  

  • In the installer, ensure custom install is selected and choose the install path /data/app/ReadyAPI-1.3.1 Once installed, run Ready! API from the command line:

 /data/app/ReadyAPI-1.3.1/bin/ready-api.sh  

  • Wait for the GUI to load in your local X environment (may be a little slow). Register the product in the GUI. Running tests suites in headless mode To run tests in headless mode we need to start Xvfb before we start the build:

 /usr/bin/Xvfb :0 -screen 0 1024x768x24 &  

  • Then include this script (execute shell)in your Jenkins job:

 #!/bin/bash  
 export DISPLAY=:0.0  
 export PATH=/opt/jdk1.7.0_67/bin:$PATH  
 export JAVA_HOME=/opt/jdk1.7.0_67/bin/java  
 /data/app/ReadyAPI-1.3.1/bin/testrunner.sh -e http://{URL}:{Port}/ -s{Suite} -c{testcase} -r -j -fTestReports -I {readyAPI tests}.xml  

Comments

  1. Thanks for sharing a valuable post and its really very helpful.

    PHP Web Development Brisbane

    ReplyDelete
  2. Thanks for sharing the info. Wondering at which stage are we activating the ReadyAPI license?

    ReplyDelete
    Replies
    1. Hi, Depends on your use case.

      A lot of this can now be done with Postman. However ReadyAPI does have some nice features. Not to difficult a sell for most businesses

      Delete

Post a Comment

Popular posts from this blog

Installing Testlink (Test Management Tool) on Ubuntu 12.04 (AWS EC2) with URL Rewrite

Running Postman tests on Jenkins using Newman and AWS (Ubuntu 14.04)