-
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
support to execlude somes 'test' in option of command line #3196
Comments
@bobshie - Can you please share what is the expectations for the following scenarios? Order of precedence when this is used in conjunction with the below command line arguments
Order of precedence when this is used in conjunction with the below listeners
Order of precedence when this is used in conjunction with a combo of the above twoWhat should the behaviour be, when there are one or more names of
|
Hi @krmahadevan, |
@YutingZhang-A - I think that would be a good option too. That change would be less invasive, and we can perhaps evaluate if that solves the use case. @bobshie - WDYT ? |
@krmahadevan But we need to think about how to distinguish between a string and a regular expression that the user specifies. |
that's a good idea. if '-testnames' can be used to exclude the tests, I think it's better than add new options. if we need to distinguish between a string and a regular expression, we can use '/regex/' (as regex in javascript, and vim) and 'normal string' in -testnames. @krmahadevan |
@bobshie - Sure. That would work too. Can you share a sample of how an actual input is going to look like for the regex part ? |
I updated the comments. do you think it's ok? |
@bobshie - So if I use Please do proceed if this understanding is in sync with this issue's expectations. |
Yes, I use '/' as delimiter. |
TestNG Version
Expected behavior
three suite file
test.xml
test1.xml
test2.xml
using existing parameter: 'testnames'
if we execute the command with
--testnames' '/Demo1/
the test result will includeonly test: Suite1.Demo1 and Suite2.Demo1
Suite1.Demo1
Suite2.Demo1
if we execute the command with
--testnames' '/^(?!Demo1-).*$/
the test result will includeexclude test: Suite1.Demo1 and Suite2.Demo1
Actual behavior
NA.
Is the issue reproducible on runner?
Test case sample
Contribution guidelines
Incase you plan to raise a pull request to fix this issue, please make sure you refer our Contributing section for detailed set of steps.
The text was updated successfully, but these errors were encountered: