| || |
How to properly integrate Selenium with Jenkins
I just wanted some expert advice. Basically, I am working on setting up an autoamted testing framework in Selenium using C# and BrowserStack. The piece that I am pretty confused about is how I will integrate the framework with Jenkins. So here are my goals, which I assume are standard for any testing framework:
1. The framework will run every night through the regression suite
2. The framework will run upon builds to do smoke tests
So obviously there is a scheduling component to this. How would I go about scheduling Selenium builds? How can I make the testing framework run when someone checks in some code? Also, do I need some kind of a post deploy script? I figured I would just use Jenkins to build and my tests will run in BrowserStack. Is it as simple as that?
Any other advice you guys would like to give will sincerely be appreciated!
Jenkins will handle the scheduling component, you can configure that through their web interface.
What you want to do is find a unit (like NUnit) or bdd framework (NBehave) to run your tests. Since you need your tests to deploy and run on their build agents, you'll want to use NuGet for dependency manager. NuGet Gallery | Home
Then to see the test results in Jenkins, you'll use a plugin that bridges your unit testing framework with a reporter that Jenkins understands. So if you do Nunit as your base framework, then you use something like, https://wiki.jenkins-ci.org/display/...S/NUnit+Plugin
For your browser stack, you'll need to make sure your tunnel is running. You may want to do some powershell scripts to start the tunnel before the tests run, and to shut it down after.