Questions tagged [testng-eclipse]

The TestNG Eclipse plug-in allows you to run your TestNG tests from Eclipse and easily monitor their execution and their output.

References:

345 questions
2
votes
1 answer

How to extent Report in Jenkins?

I am using HTML publisher plugin in Jenkins, and also i'm using ExtentReport with Eclipse to generate reports. How to generate those reports (ExtentReport) in Jenkins ?
2
votes
0 answers

Unable to add screenshot to the TestNG report

I have just started using TestNG (selenium webdriver) for automation in eclipse. I want to capture screenshot and show it in the "emailable-report.html" in the test-output folder. I am able to capture the screenshot and save it to a location in…
deep
  • 386
  • 4
  • 10
2
votes
3 answers

Getting Configuration Method Failed in Selenium

I have 2 classes. (Super Class & Child Class) Child class having 10 @Test Methods. Super Class having @AfterMethod & @ BeforeMethod. I am running the child class in Selenium using TestNG. If 1st or any of the test method is failing Remaining all the…
Suman
  • 21
  • 4
2
votes
3 answers

How to send out an Email notification in selenium webdriver using java

How to send out an Email notification in selenium webdriver using java, whenever some scenario is failed/passed in between ??
user1965826
  • 101
  • 1
  • 2
  • 9
2
votes
0 answers

Getting java.lang.NullPointerException while executing in TestNG

I am new to TestNG and I was trying my first test case with it. It`s a simple case to print a statement, but everytime I am getting java.lang.NullPointerException as you can see in attached image. Help me out.
Ashish
  • 185
  • 1
  • 2
  • 17
1
vote
2 answers

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory error using TestNG

I have installed my testNG from the marketplace. I am studying software testing using Selenium with Java. I expect a print out with this basic code, instead, it displays an error. package ui; import org.testng.annotations.Test; public class…
taerese
  • 53
  • 5
1
vote
5 answers

org.openqa.selenium.remote.service.DriverService$Builder getLogOutput INFO: Driver logs no longer sent to console by default error using Selenium Java

I'm executing a simple Selenium Java program: package Testcases; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class First { public static void main(String[] args) { // TODO…
1
vote
1 answer

selenium-testng-include and exclude are not working

include and exclude are not working in testng of selenium, please inform the reason behind it
divya
  • 11
  • 1
1
vote
0 answers

Is there a way to add group names before executing a test in TestNG (Java)?

For each test (@Test) we have to add group names dynamically before executing them. Before executing @Test method, data provider is invoked and it will give the list of group names to that particular test case falls in. Is there any way to add group…
1
vote
0 answers

Why parallel="instances" running tests within same class instance in different threads

Why following code is running tests in different threads? Test class: public class InstancesOfClass { public static int counter=0; public InstancesOfClass() { counter++; } @Test public void testA() { …
a Learner
  • 4,944
  • 10
  • 53
  • 89
1
vote
0 answers

How to execute jar file of a TestNG project in Eclipse

I am able to run a TestNg project in Eclipse by running the testng.xml file. After building the Maven project, I tried to run the jar file in the terminal using the command java -jar jarname. But it showing an error "no main manifest attribute". So…
Devleena
  • 453
  • 9
  • 25
1
vote
1 answer

Reduce number of arguments when calling from DataProviders in testng using java

I am reading the data from Excel file, let us say I have 5 rows and 15 columns in Java testNG. Review the below code Class ReadExcel { public String[][] getCellData(String path, String sheetName) throws InvalidFormatException, IOException { …
MoNa
  • 365
  • 4
  • 13
  • 31
1
vote
0 answers

How to handle random popup/alert/error that may appear anywhere and anytime in a windows application using WinAppDriver and Selenium?

I have a scenario where I am testing a Windows based application using WinAppDriver and Selenium TestNG framework. While testing the application, it may throw random alerts/pop-ups/error messages at any point of time. I would like to handle that in…
1
vote
3 answers

How to use driver.quit() when running parallel tests

i am running 4 parallel using testNG and Selenium. My Java file looks like this: public class SecondNGTest { public static WebDriver driver; public static ChromeOptions chromeOptions; public static final String USERNAME =…
mastercool
  • 463
  • 12
  • 35
1
vote
2 answers

Do methods annotated with @BeforeClass and @BeforeSuite execute before @DataProvider in TestNG?

I want to use @BeforeClass to do some test data setup and use it in @DataProvider. Is it guaranteed @BeforeClass executes before @DataProvider?
Akshay
  • 63
  • 5
1 2
3
22 23