Saturday, June 17, 2017
How to execute only failed TestNG tests in Eclipse
While running testNG suite, once we are done with one round of execution of tests in the test suite, It can be helpful to execute only the failed tests during the first round of execution to reduce test failures due to flakiness/synchronization issues.
Monday, May 15, 2017
Jenkins - Adding a conditional build step.
In Jenkins, at times we may require Jenkins to execute some build step on one condition and another in case of other condition. For e.g: It may be required to run a particular test/batch command on Weekdays and some other batch condition on weekends. We can create a job to perform different tasks based on the condition satisfied.
To add a conditional build step, follow below steps in Jenkins.
To add a conditional build step, follow below steps in Jenkins.
- Navigate to Jenkins>Manage Jenkins>Manage Plugins and go to available tab.
- Search for Conditional buildstep as shown below and click on install without restart.
- It will install the plugin and will show success once installation completes.
- Now the plugin can be used in the Jenkins job as shown below.In the job, add build step as Conditional step (single)
- Provide the conditional step from the list as shown below and execute the build command.
Saturday, May 13, 2017
WaitFor Commands for AJAX application in selenium ide
AJAX stands for Asynchronous JavaScript And XML. AJAX uses combination of browser built-in XMLHttpRequest to request data from a web server and JavaScript/HTML DOM to display/use the data. Due to asynchronous nature of request and response of the calls, there may be delay in element being displayed in the page after an action has been performed on another element in the page.
To wait for the element to appear in the page, there are different waitfor commands in selenium IDE, which waits for default timeout set up for the element to appear. So in case an element is not displayed straightway, waitfor commands can be used to resolve sync issues in selenium IDE.
Some commonly used waitfor commands are:
Some commonly used waitfor commands are:
- waitForAlertNotPresent/waitForAlertPresent
- waitForElementPresent
- waitForTextPresent
- waitForPageToLoad
- waitForFrameToLoad
- clickandWait
Subscribe to:
Posts (Atom)