Continous Intgration is a Software Development Practice where members of the team integrate their work frequently usually each persion integrate daily leading to multiple integration per day..Each integration is verified by an automated build to detect integration errors as quicky as possible...
Why CI?
- Rapid FeedBack
- Reduced Risk
- Collective OwnerShip
- Continous Deployment
CI – What does it really mean?
- At a regular frequency (ideally at every commit), the system integrated
- All changes up until that point are combined into the project
- Built
- The code is compiled into an executable or package
- Tested
- Automated test suites are run
- Archived
- Versioned and stored so it can be distributed as is, if desired
- Deployed
- Loaded onto a system where the developers can interact with it
CI – Benefits
- Immediate bug detection
- No integration step in the lifecycle
- A deployable system at any given point
- Record of evolution of the project
Ques:Which is the most widely used continuous integration tool?
Ans:Jenkins...
Jenkins is an open-source continuous integration software tool written in the Java programming language.
Jenkins is a highly configurable system by itself.
Jenkins - History
2005 - Hudson was first release by Kohsuke Kawaguchi of
Sun Microsystems
2010 – Oracle bought Sun Microsystems
Due to a naming dispute, Hudson was renamed to Jenkins
Oracle continued development of Hudson (as a branch of the
original)
What is the Use of Jenkins in Selenium
Scenario:
Suppose your Boss or Team lead assigns you 200 testcase to execute in a day.So how you will do this.If your team lives in different areas.One is in Banglore,Other is in Noida Third one is in Us.
By using Jenkins you can do this.
We will create our testcases and deploy on svn.(A Repository).What Jenkins will do?Jenkins will run those test case which are on repository.
Repository is a central hub where you all will store your Test case.
We can run our testcase using build.xml or Svn using BatchFile or Git
One of the most important feature of jenkins is
Scheduling
We can schedule our build periodically.
Suppose you need to run build 1 at 10 am
Suppose you need to run a build2 at 2 Pm tomorrow.
Notifications:
It also provide email notification whether the test case is passed or failed.(Depends on the Configuration).
Step By Step Process to install and Configure Jenkins With your Script.
Step1.Go to Link
C:Users\WorkSpace\ProjectName
Jenkins.War
This is my Project Workspace
Step3:Open Command prompt and go till project home directory and append "Java -jar Jenkins.war and run it.
After adding java -jar jenkins.war.Run it.By pressing enter.
Now Jenkins is fully up.
Step4:Open your Browser and give localhost url :> localhost:8080
This is a Start up page.Now Click on Mange Jenkins.
Step5:Now click on Configure System
Step7:Add the path of your jdk.Now click on Add jdk
Step8:Now Create a New Job.
To run your TestCase.We have to Create a New Job
Click on New Item
Add a name into ItemName
Click on radio Button of FreeStyleProject
Now Click on Advanced...
Step9:Now Add the Path of yourProject...In directory..
Note:EveryTime if you will create a new job you have to give the path of your project.
Step10:Click on Add build step:
Add BatFile into it..
How To Make BatFile
Step10:To Run Your TestCase/Job.First Create a Bat file into your ProjectDirectory
Command for Making Batfile:
java -cp bin;Jarfile/* org.testng.TestNG testng.xml
Jarfile is name of Jarfile which is in ProjectDirectory.
Jarfile should contain all the JarFile
Step11:Now next step is
Open commandprompt and SetClassPath
set classpath=yourprojectpath\bin;YourProjectpathagain\Jarfile\*;
Step11:Now Go to Jenkins.Add run.bat
After adding run.bat into it
Click on Save and Apply..
Step12:Now job is ready.You can run your TestCase..
Note:You should have mention path in project directory..(Step9) is should be there.
This is the output of Test.If it is in blue then Pass. if it is red then Fail.
How to Do Scheduling for TestCase.
Suppose you want to run your TestCase after every hour..
Post a Comment
Post a Comment