Friday, December 23, 2016

Install Jenkins as a Windows service

Once we have installed the jenkins setup, we need to launch jenkins.war file manually before accessing jenkins as shown below. To avoid running jenkins.war manually to start jenkins, we can install jenkins as a window service.


Steps to install Jenkins as window service:


1. From the localhost jenkins machine, run the jenkins.war files as shown above.

2. Once Jenkins is up and running, open localhost:8080 in the browser.

3. Go to Manage Jenkins> Install as Windows Service.

4. Follow steps in below screenshot to install Window Service.


5. Go to run>services.msc. Jenkins should be installed as a service.


How to configure jenkins for user access without login authentication

In the previous article, we explain how to install Jenkins.  Jenkins setup on localhost server
Once Jenkins is installed, we can connect to Jenkins from localhost:8080 or <ServerName>:<Port Number> from the browser.

Once we open the url, It asks for username and password to connect to the jenkins server. In most cases, we require username/Password authentication to connect to the jenkins server as shown below:
:


However, In case we want everyone gets full access to the system and do not need to login , We can skip user authentication using below steps:
  • Navigate to .jenkins folder (Location: c:\users\<user acc>\.jenkins)
  • Open config.xml file in the folder.
  • set element<useSecurity> value as false.
  • Remove elements authorizationStrategy and securityRealm as shown below:
  • Restart Jenkins
  • Once Jenkins restart, acess localhost:8080 (check if port is same or different in your jenkins)
  • It will not ask for Username and password as shown below and jenkins dashboard will be displayed as shown below




Tuesday, December 6, 2016

Tutorials to understand TestNG for Selenium Webdriver

Installing TestNG in eclipse - This post explains how to install TestNG in eclipse.


MindMap for TestNG - Understanding the concept in TestNG using MindMap.


Annotations in TestNG - Different annotations used in TestNG 


Assertion and Soft Assertions in Selenium Webdriver using TestNG - What are different assertions and soft assertions in selenium webdriver. What is the difference between assertions and soft assertion. How to use assertion in the test.


Maven POM.xml: Dependencies for Selenium, TestNG and junit - How to add TestNG dependenies in maven project.


Using dependencies and priority in TestNG tests: Ordering tests execution - how to define dependencies between tests and priotising order of tests execution in TestNG.


Creating TestNG.xml to run Selenium test suites - How to create testNG xml file for executing testsuite in TestNG. This article explains, how to create xml file for execution in  different scenarios.


How to run multiple test suites in TestNG? - Suppose we have individual suite for different module. This article explains how to create testNG xml file to run multiple test suites.


Maven POM.xml: Dependencies for Selenium, TestNG and junit - How to add dependencies for TestNG in Maven POM.xml