TestNG is a testing framework, inspired by the JUnit/NUnit unit testing frameworks. TestNG is intended to support more than just unit testing, allowing functional, end-to-end, integration, etc.

learn more… | top users | synonyms

3
votes
1answer
74 views

Can I execute selenium test cases in a real browser with Jenkins Selenium and Maven

I am working on selenium project with Jenkins + Maven + Selenium + TestNG I am following few questions. Can I execute selenium test cases in Jenkins by launching browsers? Currently it gets ...
1
vote
1answer
281 views

Appium: How to get adb logcat for multiple android devices

I have to execute my test on more then one device. So how to get logcat for every device? My current code is: List logEntries = driver.manage().logs().get("logcat").getAll(); File logFile = new ...
0
votes
1answer
76 views

How to Fail Test case based on condition in TestNG Report

I am using TestNG and having one issue. Test Case : I am checking validation message that if user leave email id blank & Click on Login , System should fire message "Please Enter Valid Email". I ...
0
votes
1answer
29 views

Is Parallel Testing possible in Cucumber with TestNG?

I am trying to implement Cucumber-JVM with testNG and I need to execute the scripts in parallel with multiple browsers. Is Parallel Testing possible in Cucumber? If Yes, Can any one help me on this?
0
votes
2answers
42 views

Assert in TestNG (Actual int value, Expected int value)

Is there anyway to assert that, actual int value = expected int value not equal to 0 Something like, Assert.assertEquals(length, 0);
1
vote
0answers
373 views

Selenium Webdriver and OpenLayers

I would like to check that the locations asset on map (openLayer) are the same with some asset in a row. What is the best way to do this? I'm using the TestNG framework.
1
vote
2answers
32 views

What is the difference between Priority and Depends on Method in TestNG?

I am lagging behind to understand the concept of dependsOnMethods and priority. I googled but I didn't get enough info about this. A one line answer will be greatly appreciated. Can we write multiple ...
0
votes
1answer
43 views

Test Scenario for cookies in selenium webdriver

I want to work with cookies in my project, I don't know what will be the Test Scenario and Test Cases for it. Please help.
1
vote
2answers
4k views

How to run TestNG failed test cases in Jenkins for Maven project?

I am new to Jenkins and I have configured it on my Windows PC. I have to run failed test cases twice before considering that they are failing. I am using TestNG and Selenium Webdriver for writing test ...
0
votes
2answers
3k views

Can I force a Jenkins job to report a successful TestNG test even when the suite has failures?

Can I force a Jenkins job to report a successful TestNG test even when the suite has failures? I have a test suite with 100 tests and I want to report a success in Jenkins if there are 3 or fewer ...
0
votes
1answer
168 views

How to integrate Jbehave and TestNG?

I googled and found most of scripts were written in Jbehave with junit. But I'm trying to integrate Jbehave with testNG framework. And the following were I tried so far. Feature file: Scenario: ...
0
votes
1answer
44 views

How can I execute selected test cases from list of testcases in TestNG at runtime?

I want to create a page with the details of test cases (say a HTML Page with some content). Say the testcases will be listed there. When i want to run the test cases then I will select them and click ...
0
votes
3answers
111 views

how to run failed testcases using TestNG?

I created jar when i run on command prompt i am able to see result, what i want is "i need to run failed test cases if there is any" public class DemoProjectClass { public static void ...
1
vote
2answers
42 views

Element is currently not visible" random text fields

I am getting this error "Element is currently not visible" when I try to input into textbox which is visible I've created a script to signup and I am getting this error randomly sometimes on ...
1
vote
2answers
56 views

Effective way to deliver automation script to client?

I am QA automation engineer. We have so many clients for whom we are doing web scraping. We automate their daily task to save their time and resource. Every client demands that they should able to ...
1
vote
2answers
62 views

@Parameters getting Skipped, just basic tests

Here is my testng.xml: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite ...
0
votes
3answers
409 views

Get Text of a WebElement

I'm learning selenium and writting automation script for this website http://store.demoqa.com/products-page/your-account/ I'm trying to get value of the error message, I identified Error Message ...
2
votes
1answer
344 views

Running failed test cases in TestNG

I have a suite which consists of 2 test cases. When I run this suite, the results should be 1 passed and 1 failed. When I am trying to run the failed test cases through TestNG-failed.xml file, it is ...
0
votes
1answer
88 views

export list of testNG tests

I have a selenium framework in combination with TestNG. Is it possible to export a list of all test names are their description within a project/suite?
0
votes
1answer
41 views

How to scroll in html table of webpage?

A web page is showing a table of the first 10 data items out of 150. I want to scroll that table until the element is found. How can I achieve this? I refereed this question ...
0
votes
1answer
31 views

Required parameters but none were supplied error

Can someone help me on how to fix the error and run the script? public class ExcelCapture { public WebDriver driver; String filePath = ...
0
votes
5answers
387 views

How to revert the changes made by selenium in a tear down process?

I am in a situation where I have to revert all the changes which I made while testing the application. Is there any way of doing this in Testng? Suppose if I have added something into the ...
0
votes
2answers
57 views

How to run multiple Test cases on different browsers in TestNG with Java

I'm new at TestNG. So, I want to know more details about how to run multiple test-cases on different browsers. Which Framework model should I use in my project? So that each & every part of my ...
0
votes
0answers
28 views

How to launch Safari Driver in Selenium?

I'm trying to launch Safari Driver, but it gives error while launching. Which is the exact procedure to launch Safari? could you please explain? package configuration; import ...
0
votes
3answers
110 views

How to run multiple test cases without running before and after class again and again

I want to know how run multiple files without running the before class() again and again. E.g.: Consider i am writing test case for GMail login.java : Which contains complete testing of the login ...
2
votes
2answers
3k views

How to verify whether selected item is exist in another page? (Ecommerce application)

I am trying to verify selected item is exists in another (Cart/Shopping Bag) page, for EX: I am buying one/many items from application and then I will move all the items to Cart/Shopping Bag, here I ...
1
vote
1answer
33 views

verify element padding using Galen Framework

I am in process of evaluating Galen as UI automation framework. I am blocked at one point where Galen is unable to give correct results in case of padding around an element. This is the sample DOM. ...
0
votes
2answers
136 views

TestNG.java.lang.NullPointerException running second @Test

It runs first test, but then I'm getting null pointer exception when running Edit Profile test. Not sure why. I globally declared public driver. Please help. Thanks package test; import ...
2
votes
3answers
1k views

Cannot Instantiate class error - Selenium WebDriver

I am facing this 'Cannot insantiate class' error on running one of my test cases in Selenium webdriver using Java. Below is the class of the functionality of the test, package Pages; import ...
2
votes
1answer
67 views

The jenkins build fails when any testng test case fails. How to make it so that the build succeeds when all test-cases are run regardless of result? [closed]

In my Test Automation, when we execute the TestNg Suite XML then whenever any test case fails the Jenkins Build also fails. But I require that the TestNG report shows the proper result, either Pass ...
1
vote
2answers
118 views

Class Under Test vs Object Under Test

What is the difference between Class Under Test (CUT) and Object Under Test (OUT)? CUT is used to test a class and OUT is used to test an object. — I'm unable to find any difference ...
0
votes
2answers
86 views

TestNG showing as test passed even if assertion fails

I use below Java code to check if test fails @Test public void myMethod(){ .. .. Assert.assertEquals(condition1,condition2); }catch(AssertionError e){ e.printStackTrace(); } Even if condition1 and ...
1
vote
2answers
90 views

TestNG + java. Difference between Assert.assertTrue and Assertion?

I'm a little bit confused in testNG assertion methods. My question is simple - is there any difference between Assert.assertTrue and Assertion? I mean difference between following: ...
1
vote
2answers
83 views

Logging every action with custom “debug” method. Good idea?

I'm creating my first full framework using Selenium and TestNG and recently implemented the ability to have logging enabled which will track every action (before and after). public class CustomLogs { ...
-1
votes
1answer
87 views

How should look test in webdriver with scenario

I have to test demo.opencart.com. Here is my scenario: Test scenario: 1 Open browser and go to Democart 2 Change currency to GBP (top left dropdown) 3 Search for “iPod” using text search 4 Add ...
0
votes
0answers
18 views

testNG email report display in outlook 2013

I am facing one problem about the testNG report display in outlook. I did some changes to the report displaying format before sent out. Look at the display in outlook 2013 client: Look the display ...
0
votes
1answer
23 views

Test methods executed which is are mentioned in test suite xml

I have an issue while executing a test suite. Some of the test methods are automatically executed even though they are not specified in test suite. I am using TestNG + WebDriver Here I have two test ...
1
vote
1answer
31 views

Difference between Hamcrest-library jar and Hamcrest-all jar

What is the difference between using the hamcrest-library-1.3.jar that comes bundled with Selenium Webdriver (I use v2.49) and hamcrest-all-1.3.jar found on the official website of Hamcrest ...
3
votes
2answers
60 views

Which test execution framework for Java has the highest test coverage?

I found TestNG failing occasionally and when I started to investigate I found it has little test coverage. It looks like the test framework itself is poorly tested. Which other test execution ...
3
votes
2answers
144 views

Is there any test result reporting tool for TestNG & Selenium WebDriver with Java?

I am using TestNG and Selenium webdriver via Java. Is there any tool that can help generate detailed test results, for example, suppose I have a test case that fails more often than not, is there a ...
0
votes
0answers
30 views

How to run all the tests in various classes of testng test suite with an executable jar file

I have a project in which there are multiple classes and in each class there are various tests. I have created a testng.xml which i run from eclipse and it is successfully running the tests one by ...
4
votes
4answers
4k views

IE not executing test case properly in selenium webdriver

I am running test cases on firefox and chrome browsers, it worked fine for me using selenium webdriver.But when it comes to using IE versions(9-11), i am getting below mentioned error messages : ...
1
vote
2answers
143 views

How to skip failed test cases using TestNG

How to Skip the failed test cases and to execute the remaining test cases when using Selenium, Java and TestNG.
1
vote
0answers
45 views

TestNG reports email after test executions

I've found various links for sending TestNG reports to be emailed after test executions here are two of the links ...
5
votes
1answer
632 views

How do I verify a Link URL using Selenium Webdriver / TestNG?

I'm trying to do an assert to make sure a correct XMLHttpRequest is made. I know that I can get the exact Request URL from the Developers Console -> Network tab -> XHR tab's general information ...
2
votes
3answers
138 views

How to add @parameter annotation for TestNG in Eclipse

I'm trying to do parameterization for TestNG in Eclipse but the annotation @parameter is not being shown. How to add @parameter annotation for TestNG in eclipse?
4
votes
3answers
402 views

Page Object Model or External property file for Selenium Object Repository

I am a beginner in Selenium WebDriver (Java with TestNg). I'm trying to create a framework of my own. My question here is what would be the better option to store my objects (basically all the ...
1
vote
1answer
117 views

Parameters with DataProviders

Is there any way to use Parameters with DataProvider together in Selenium ? @Parameters({"safaf"}) @DataProvider(name="sss") public void hhhhh (String safaf){ }
0
votes
1answer
7k views

Running my first program using TestNG and getting error

I am getting following error when run my selenium webdriver progarm using testNG: org.testng.TestNGException: Cannot find class in classpath: testng at ...
1
vote
3answers
8k views

Running WebDriver tests in parallel using testng.xml

I'm trying to run WebDriver tests in parallel using testng.xml. I'm able to run testng tests in parallel by using parameter parallel="tests" but running with following paramters, "methods", "classes" ...