TestNG is a test automation 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

0
votes
1answer
3k 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 ...
1
vote
1answer
141 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
74 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
58 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 ...
3
votes
2answers
89 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
1answer
52 views

I need to click on the dropdown which contains a keyword (identifier)

There is a type and search drodown which will appear after user type in the value. I need to click on the dropdown which contains the name of the drop down field. The problem here is that there is ...
1
vote
1answer
168 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
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
0answers
8 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 ...
2
votes
3answers
634 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 ...
1
vote
1answer
39 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
141 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 ...
3
votes
4answers
3k 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
62 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
30 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 ...
0
votes
0answers
45 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: ...
5
votes
1answer
191 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
101 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
238 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
73 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
5k 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 ...
0
votes
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" ...
1
vote
0answers
97 views

Unable to run as TestNG in Eclipse Kepler or Luna on Mac machine

I am using Mac Yosemite 10.10.3 and Eclipse Kepler (4.3). I installed latest TestNG from the official site testng.org and added it successfully from Help menu but TestNG option is not showing under ...
1
vote
1answer
86 views

Logging in Firefox on same portal with different Credentials using TestNG Data provider and Selenium

import java.util.concurrent.TimeUnit; import org.openqa.selenium.*; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.Assert; import org.testng.annotations.AfterSuite; import ...
0
votes
1answer
40 views

Dataproviders and Asserts

When using DataProviders, on TestNG, my test method has asserts that will fail since the data passed in navigates to a different url. Is there a way to work around this, i.e. a way for the data to ...
0
votes
1answer
489 views

TestNg not executes @BeforeGroup if the method is in another class

My code structure is like this: I have four classes having ten tests and one @BeforeClass method to run before any of the tests. In each of four classes all tests are of one single group. And I have ...
0
votes
2answers
1k views

Setting TestNG test case result as PASS/FAIL as per my requirement

I have one requirement, I need to read the test data from the excel sheet and after the test case execution I need to write in to excel sheet as PASS/Fail/ Skip. I have used TestNG framework,Below ...
0
votes
0answers
32 views

Where can we see @Test(description=“test description”) in report?

I am unable to see the my test description in report. I use this annotation for it: @Test(description="TestCase Description") Where can I see the above description of my test case in the final ...
1
vote
1answer
555 views

TestNG vs Robot Framework - pros and cons

What are the pros and cons of using Robot Framework with selenium2Library (webdriver). Which one is the better option for web application testing - TestNG or Robot Framework?
-3
votes
1answer
79 views

Where can I download TestNG-6.8.5 JavaDoc Jar file? [closed]

Where can I download TestNG-6.8.5 JavaDoc Jar file?
1
vote
1answer
547 views

send testng report(emailable-report.html) file through mail after executing all test cases

I am trying to send an email after executing the test cases with an attachment of testng generated emailable-report.html file ,But I am resulting in error. please find the stack trace here and do ...
0
votes
3answers
59 views

How to check the mail has been sent in the gmail?

How to check the mail has been sent in the gmail? I have entered the mail id and sent the mail. It is giving me the line the mail has been sent. How to verify that?
1
vote
2answers
82 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 ...
1
vote
1answer
159 views

Can I email the testNG reports directly through selenium?

I want to send the testNG reports directly through mail to the stakeholders once its complete execution. What is the best possible way for it?
0
votes
0answers
35 views

Unable to get testng report one by one; Both reports are coming simultanously

I have two testng.xml files. I did entry for these two testng.xml files in pom.xml like this: <suiteXmlFiles> ...
2
votes
2answers
327 views

Error: cannot find symbol in XSLT + TestNG Report

When I followed this link LINK to generate XSLT Report Using testng and to send email reports getting error message (Ex: package org.openqa.seleni um does not exist, etc...0). Please suggest me. ...
1
vote
1answer
3k views

How to modify testNG report in selenium java

I am running my script in java and getting the results in testNG. But in my application after filling up the form I am getting a confirmation alert message. I am able to read that alert message and ...
1
vote
1answer
277 views

How to click on element only if data exists in excel table? [closed]

Hi so currently I'm working with Selenium webdriver in Eclipse.. I'm testing a web app and having data driven from an excel sheet. There is optional information and you can click 'ADD' and then a pop ...
0
votes
1answer
165 views

How to open and get input from a popup before running test?

I want to open a popup before running my tests and after completing my test run. I want to give few inputs from the popup on basis of that my test will run. Suppose I have multiple links on which my ...
1
vote
2answers
1k views

How can I ensure testNG test method does not abort if any assert fails

I know there is a difference between assert and verify in Junit; the assert results in a runtime exception, causing test method execution to abort. To overcome this problem, we can have verify which ...
0
votes
1answer
163 views

Access WebElement in selenium testng [closed]

having code like this, with WebElement inside of class @Test public void testTable() { WebElement simpleTable = driver.findElement(By.id("items")); simpleTable.click(); } how ...
1
vote
0answers
164 views

How to disable specific Maven and TestNG test listeners when running tests from groups?

I am using Maven and TestNG to support my Selenium testing framework for a project. I am using a custom test listener to report results into TestRail (our TCM tool). I am also using another custom ...
0
votes
1answer
192 views

Automation framework structure for two browsers simultaneous testing

Some high level (UI) smoke test scenarios should be automated for the web application made for audio/video/chat conference calls. At least one to one(peer-to-peer) users should be used to simulate ...
0
votes
0answers
797 views

TestNG with Selenium Data and Keyword Driven Framework

I am new to TestNG. I'm using Hybrid Framework For Automation Testing, it's Hybrid Architecture based, in which Keyword(Java Methood name) and data is provided in Excel sheet, and based on that ...
2
votes
2answers
180 views

Should test cleanup happen in each individual test method or in a general test cleanup?

For example, let's say I have these tests: test1() { signIn(); // Do some testing signOut(); } test2() { signIn(); // Do some testing signOut(); } Would it be better to ...
1
vote
0answers
1k views

Dependent methods in the same class run out of order only when included in a “testng suite”; running class independently respects the dependency

I have a class with dependent methods using the TestNG annotation dependsOnMethods The test runs fine 100% of the time if I simply run it as a TestNG Test from the package. When I include the test ...
1
vote
3answers
3k views

Using multiple instances of webDriver

I have defined an object of Web driver in one class as Static WebDriver driver; and want to use that instance in another class to automate the browser. Is it possible? Or will I have to define ...
0
votes
2answers
7k views

Send testng report through email after test execution

I have to send an email of report of the test as soon as my all tests get executed. I will have to mention this in AfterSuite but don't know what exactly will have to use to achieve this. Any ...
1
vote
1answer
230 views

how to print currency symbols using webdriver with testng

In Dropdown currencies are listed as($,€,₤). Based on the selected currency, prices will display in other page like ($10,€10,₤10). Using the below code, I got the selected value from the dropdown. ...
0
votes
1answer
913 views

How to run data driven testing using testNG in selenium

I am using testNG framework and tried to import data from excel sheet in my local. If I run the code as simple java application then its running but with testNG its not public class NewTest { public ...