Select

Selenium and Hudson Integration:Keeping your Test Code separate from execution code

Selenium and Hudson Integration:Keeping your Test Code separate from execution code

After my last post on integrating Selenium RC tests with Hudson,I had few folks asking me on how I organized my test execution code with selenium RC tests.

If you are like me you probably started with running Selenium RC tests on your local machine and didn’t give much thought about integrating with Hudson,but when it was time,there was lot of files moving around and unnecessary cruft of code.

To run this sample,you will need ANT and Java on your machine

So here is a sample TestNG runner code which is ready for Hudson to consume and at the same time having a clean separation between Selenium RC tests and execution.This structure should make things easier when multiple team members are writing test cases allowing easier test code checkin to your version control system.So look at the attached zip file.Please find instructions on how to use this in the README folder.I have also included a sample Selenium RC project which the current TestRunner configuration points to.

This code is not intended to replace the Eclipse+TestNG plugin and it’s use in dev environment is highly recommended.But this code does the next step of getting your Selenium RC tests ready to be used by Hudson.For now the test runner is overtly simplistic and can only run a single TestNG configuration file,but feel free to extend this and make your own modifications to suit your needs.

When you are ready for Hudson to run your Selenium RC + TestNG tests,have your Hudson job execute the STunner/bin/seleniumtestrunner.xml and sit back and watch your tests run.

If your Hudson is on a Unix machine,look at my earlier post on Integrating Selenium Tests with Hudson CI

If you want how to convert your hudson cluster to Selenium Grid ,this post should help you.

Let me know if it doesn’t work for you or other issues that you face.

Follow us on @apexon on twitter to get more updates on Selenium as well how we can help your organization get Selenium ready.We offer multiple Selenium solutions that fits every project size and needs.

Important:The bundle doesn’t contain the selenium-server.jar as the size of the bundle increases.So the very first thing you will need to do is to download selenium server and copy it under ‘server’ directory.

Interested in our Testing Services?

Contact Apexon +1 408-727-1100

By submitting this form, you agree that you have read and understand Apexon’s Terms and Conditions. You can opt-out of communications at any time. We respect your privacy.

By submitting this form, you agree that you have read and understand Apexon’s Terms and Conditions. You can opt-out of communications at any time. We respect your privacy.

Other stories you may enjoy...

Healthcare Apps and the Need for Security

One of the most exciting areas in tech right now promises to be “the most personal” ever. A key aspect of making wearable devices like the Apple Watch personal is through...

Developing an App for the 2020 General Election?

Here is a thought: With the UK General Election having just finished, could the next one in 2020 be the first to use a mobile app to allow people to vote? The polling...

Be honest. Describe the state of your test cases.

“There’s some dead wood in there.” “Hmmm…. Someone really needs to clean them up.” “A little outdated.” For those reading this in the northern hemisphere,...