itwxming 2014-10-15
UFT integration with JENKINS
With now CI (Continuous Integration) being the talk of the organizations who are differentially focused on Agile Methodology, It requires Automation Testing to be integrated with the CI environment. A recent article I read mentioned that dev build verification need not be limited to just unit tests or sanity /smoke – why not the complete functional automated tests? Such demands by our clients ups the ante for accurate & uninterrupted testing.
Hence this article on how you could successfully integrate your UFT scripts with JENKINS. While I will make use of ALM, It is up to the user to integrate the scripts with/without ALM.
What is JENKINS? (Source: Wiki)
Jenkins is an open source – Continuous Integration tool written in Java. The project as forked from Hudson after a dispute with Oracle
Jenkins provides continuous integration services for software development. It is a server-based system running in a servlet container such as Apache Tomcat. It supports SCM tools including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, Clearcase and RTC, and can execute Apache Ant and Apache Maven based projects as well as arbitrary shell scripts and Windows batch commands. The primary developer of Jenkins is Kohsuke Kawaguchi.Released under the MIT License, Jenkins is free software.
Builds can be started by various means, including being triggered by commit in a version control system, scheduling via a cron-like mechanism, building when other builds have completed, and by requesting a specific build URL.
You can download JENKINS from –
Does UFT integrate into JENKINS?
Yes. While the plain old methods such as triggering it through a batch file was always there ; But with no direct mechanisms to get the Test results back into JENKINS, HP has an Jenkins plugin which caters to a complete Test Execution life cycle from execution to reporting.
You can download the plugin from –
https://wiki.jenkins-ci.org/display/JENKINS/HP+Application+Automation+Tools
Assuming you have JENKINS and HP plugin installed your Jenkins plugin page should look like the below –
As a next step you need to configure JENKINS to point to your ALM server & the TESTSET
Scroll Down to the ALM section & enter your ALM details
Now that we have all the basics set, it’s time we actually test a build. I also assume you have a TestSet consisting of 1 or more tests in Quality Center. I am sure you would appreciate the beauty of the post execution details that would be visible right from JENKINS with the Execution History & drilled results notifying every step within JENKINS dashboard.
1. Create a New Free Style Software Project in JENKINS as below
2. Look for “Build” & “Post-Build Actions”
3. Add the QC details in Build information – “Execute HP tests from HP ALM” & Choose “Publish HP Tests Result” in the Post-Build Actions.
Click on Save
Now that you have your Item created, you may choose to test the same. Click on the Highlighted image to test your Build.
Check in Build History for the results
You have options to either look through the command line execution status history & also as a separate result per test.
If you look the results precisely, it has detailed information related to the TestSet, Individual Test with also deep dive into the steps per test & their related information too.
Now that you have successfully integrated UFT into JENKINS only imagination is the limit to your needs. You can schedule automatic builds, trigger on demand or periodically. With email functionality integrated within JENKINS users/developers can get the build test results/reports directly instead of seeking separate reports.