-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GITHUB-2897] Not exception but warning if some (not all) of the give… #2900
Conversation
…n test names are not found in suite files. Change-Id: Ica210f6c05b395f1d0a6718479f71b645ebd39cc Signed-off-by: Bruce Wen <[email protected]>
…n test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. Change-Id: Ica210f6c05b395f1d0a6718479f71b645ebd39cc Signed-off-by: Bruce Wen <[email protected]>
…n test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. Change-Id: Ica210f6c05b395f1d0a6718479f71b645ebd39cc Signed-off-by: Bruce Wen <[email protected]>
…n test names are not found in suite files. Change-Id: Ica210f6c05b395f1d0a6718479f71b645ebd39cc Signed-off-by: Bruce Wen <[email protected]>
test names are not found in suite files. Change-Id: Ic1835ef6768b8594f54217b3eb8dfd282901aa29
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. Change-Id: I259ae3feef5bebd3a58afe634b7c96a8d6e9ea01
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. Change-Id: I259ae3feef5bebd3a58afe634b7c96a8d6e9ea01
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. Change-Id: I259ae3feef5bebd3a58afe634b7c96a8d6e9ea01
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. Change-Id: I259ae3feef5bebd3a58afe634b7c96a8d6e9ea01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed typos and import issues
testng-core/src/test/java/org/testng/xml/internal/TestNamesMatcherTest.java
Outdated
Show resolved
Hide resolved
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. Change-Id: I259ae3feef5bebd3a58afe634b7c96a8d6e9ea01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to fix issues about import and boolean values
testng-core/src/test/java/org/testng/xml/internal/TestNamesMatcherTest.java
Outdated
Show resolved
Hide resolved
testng-core/src/test/java/org/testng/xml/internal/TestNamesMatcherTest.java
Outdated
Show resolved
Hide resolved
testng-core/src/main/java/org/testng/xml/internal/TestNamesMatcher.java
Outdated
Show resolved
Hide resolved
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. Change-Id: I259ae3feef5bebd3a58afe634b7c96a8d6e9ea01
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. Change-Id: Iffbf3803c706ea4a9c7dd0930cec9c666962c16a Signed-off-by: Bruce Wen <[email protected]>
testng-core-api/src/main/java/org/testng/internal/RuntimeBehavior.java
Outdated
Show resolved
Hide resolved
testng-core/src/main/java/org/testng/xml/internal/TestNamesMatcher.java
Outdated
Show resolved
Hide resolved
@wenijinew - I see this warning Also please help add a test that vets out the below behaviour.
What would the behaviour be? Should TestNG return success, even though it didn't run any tests or should TestNG fail ? |
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. Change-Id: Iffbf3803c706ea4a9c7dd0930cec9c666962c16a Signed-off-by: Bruce Wen <[email protected]>
Change-Id: I6796e900610fa6df169a6a63368af938cec9f204
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. Change-Id: I3b26df325b3e1576a8153c50c555a4dcadab820e
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. 4. Fixed legacy unit test issue for ensuring no exception thrown when given test names are from different levels of test suites. Change-Id: I614d74afabf8d9c8af28f0104188d68abafc1aa1
Change-Id: I8c80c0fcd680c79e30b2405f10d1e0394d8bc3df
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. 4. Fixed legacy unit test issue for ensuring no exception thrown when given test names are from different levels of test suites. Change-Id: Icc02e7f9384a7213861d46dfb9aed246f4bde692
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. 4. Fixed legacy unit test issue for ensuring no exception thrown when given test names are from different levels of test suites. Change-Id: I03b554abe0a28a6717644b4388fd5e4d5f77b2bd
Exception will be thrown if all given test names are invalid. Please help check the latest code change and new test cases. Thanks. One special case: given test names are empty. -testnames "". I've also made change for that. if (testNames != null && !testNames().isEmpty()) Instead of throwing an strange exception like "The test(s) <[]> cannot be found", the whole suite will be run. Hope you agree on it. |
I suppose the conflicts are gone now. |
In that case, maybe more special input need to consider: test names are not an empty list but each element in the list is blank. :( |
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. 4. Fixed legacy unit test issue for ensuring no exception thrown when given test names are from different levels of test suites. Change-Id: I03b554abe0a28a6717644b4388fd5e4d5f77b2bd
Change-Id: Ia4b599031512fcf99cfd24d646490d6ac7b583ed
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. 4. Fixed legacy unit test issue for ensuring no exception thrown when given test names are from different levels of test suites. Change-Id: I03b554abe0a28a6717644b4388fd5e4d5f77b2bd
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. 4. Fixed legacy unit test issue for ensuring no exception thrown when given test names are from different levels of test suites. Change-Id: I3a1e10c5443a9f5705ebe9d2fd4061157361389d
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. 4. Fixed legacy unit test issue for ensuring no exception thrown when given test names are from different levels of test suites. Change-Id: I3a1e10c5443a9f5705ebe9d2fd4061157361389d
Change-Id: Id167abd2eae744b23d3c820e47129f618cae010b
…structors, not to instance method Change-Id: I75bb215fed1ba19938580391a7980439d937883b
…eMissedTestNames clear. Change-Id: Id831021470cd013ce55d5b4a245200b8ffee1897
TestNamesMatcherTest#testHaveExceptionWhenIgnoreMissedTestNamesEnabledWithAllInvalidTestNames added for this and TestNGException is expected. |
Any null or empty list, or any list with all elements are null or empty or blank are treated as invalid input, and exception will be thrown from TestNamesMatcher:
|
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. Add new supported system property 'testng.ignore.missed.testnames' for the same purpose. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. 4. Fixed legacy unit test issue for ensuring no exception thrown when given test names are from different levels of test suites. 5. Abnormal case: when value of testNames is null, empty, or a list with all elements are null or empty or blank, exception will be thrown: TestNGException("Please provide a valid list of names to check."). Change-Id: I004dd3f500246856fc603d418fb834c96e8f6922
Could you please help review the latest commit? Thanks! |
@wenijinew - Please let me know once you have removed the JVM argument part in this PR. We are trying to stick to just setting all dynamic behaviours via command line arguments (which can be set both via a build tool as well as from the command line). Once done, please ping back. I can wrap up the review for this PR. |
Change-Id: Ie278c1e68ca0ef6179f0689983c9f5f73e5eeb71
Change-Id: I063900208fd7ad28149dd53a3084783c640ab421
(not all) of the given test names are not found in suite files. 1. Add new boolean option '-ignoreMissedTestNames' to work with the option '-testnames'. 2. When -testnames is given, and '-ignoreMissedTestNames true' is also given, then in case any missed test names not found in the suite, only warning message will be printed, TestNG will continue to run other test names which are existing in the suite. 3. Users who are going to use the new option '-ignoreMissedTestNames' should be aware of that the logging level should be properly configured to make sure the warning message is visible in output or console, rather than missed the notification of the missed test names, if any. 4. Fixed legacy unit test issue for ensuring no exception thrown when given test names are from different levels of test suites. 5. Abnormal case: when value of testNames is null, empty, or a list with all elements are null or empty or blank, exception will be thrown: TestNGException("Please provide a valid list of names to check."). Change-Id: I37f762cdda4f91f9d43cc69cc03f0135ea282aaa
As requested, the VM argument has been removed in the latest commit. Please help review. Thanks. |
@juherr - Please help take a quick look. We would need to squash and merge this PR, because there are a lot of commits in this PR. |
…n test names are not found in suite files.
Change-Id: Ica210f6c05b395f1d0a6718479f71b645ebd39cc
Fixes #2897 .
Did you remember to?
CHANGES.txt
./gradlew autostyleApply
We encourage pull requests that:
If your pull request involves fixing SonarQube issues then we would suggest that you please discuss this with the
TestNG-dev before you spend time working on it.
Note: For more information on contribution guidelines please make sure you refer our Contributing section for detailed set of steps.