question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Testng skips all test classes from suite

See original GitHub issue

If you have two @BeforeClass in a test class and where second @BeforeClass depends on first one like this:

@BeforeClass
public void doLogin() {// Do Login}

@BeforeClass(dependsOnMethods = "doLogin")
public void logout() {// Do logout}

Then it will skip all the test classes from suite, if for any reason first @BeforeClass fails or throws exception.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:17

github_iconTop GitHub Comments

1reaction
nirmitsrivastavacommented, Oct 25, 2018

Hello @krmahadevan @juherr Using 6.11 Testng and any exception in BeforeClass skips the remaining test cases from other classes too. Please check and let me know if you need more information regarding the issue.

0reactions
nirmitsrivastavacommented, Oct 26, 2018

Ok. we have updated our TestNG version. Will create a new ticket if the problem persists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failure in one test class skips all test classes in a given suite
When a test class fails due to config failure the remaining test classes from that suite is skipped. Is the issue reproductible on...
Read more >
Skip tests or classes in TestNG - java - Stack Overflow
This listener doesn't set Skip status, it just disables these test methods. So they aren't present in test reports at all. And not...
Read more >
How to skip TestNG test at runtime? - Tutorialspoint
TestNG supports multiple ways to skip or ignore a @Test execution. Based on requirement, the user can skip a complete test without executing ......
Read more >
My testcases are skipped with no cause. Am new to testng and ...
Am new to testng and did nothing regarding 'skip test' in my code. But still wondering why my test cases are skipped in...
Read more >
TestNG - Disable or Ignore Tests - HowToDoInJava
1. Skip a Test with @Ignore · In a test method · In a class · In a particular package · In a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found