forked from testng-team/testng
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IHookable and IConfigurable callback discrepancy
Closes testng-team#2704 Ensure that TestNG reports scenarios wherein User defines callbacks for configurations/test methods But fails to invoke those callbacks explicitly And also fails in shipping test status to a user recognized status (PASS|FAILURE|SKIP)
- Loading branch information
1 parent
55e8e52
commit fbb04ef
Showing
14 changed files
with
329 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
testng-core-api/src/main/java/org/testng/ConfigurationNotInvokedException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.testng; | ||
|
||
/** | ||
* Represents an exception that is thrown when a configuration method is not invoked. One of the | ||
* use-cases when this can happen is when the user does the following: | ||
* | ||
* <ul> | ||
* <li>User defines a configuration method | ||
* <li>The class that houses the configuration method defines support for callbacks via {@link | ||
* IConfigurable} implementation | ||
* <li>User willfully skips invoking the callback and also fails at altering the configuration | ||
* method's status via {@link ITestResult#setStatus(int)} | ||
* </ul> | ||
*/ | ||
public class ConfigurationNotInvokedException extends TestNGException { | ||
public ConfigurationNotInvokedException(String string) { | ||
super(string); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
testng-core-api/src/main/java/org/testng/TestNotInvokedException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.testng; | ||
|
||
/** | ||
* Represents an exception that is thrown when a test method is not invoked. One of the use-cases | ||
* when this can happen is when the user does the following: | ||
* | ||
* <ul> | ||
* <li>User defines a test method | ||
* <li>The class that houses the test method defines support for callbacks via {@link IHookable} | ||
* implementation | ||
* <li>User willfully skips invoking the callback and also fails at altering the test method's | ||
* status via {@link ITestResult#setStatus(int)} | ||
* </ul> | ||
*/ | ||
public class TestNotInvokedException extends TestNGException { | ||
public TestNotInvokedException(String string) { | ||
super(string); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.