You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run ginkgo normally, the test runs and passes. Using ginkgo --junit-report=junit.xml to produce junit report I see the name of the test has been generated.
<testcasename="[It] Example example pass"classname="Example Suite"status="passed"time="4.6184e-05">
If I use the full testcase name as the argument for -focus e.g. ginkgo -focus "[It] Example example pass" the test gets skipped.
Will run 0 of 1 specs
S
Ran 0 of 1 Specs in 0.000 seconds
SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 1 Skipped
If I escape the [ and ] e.g. ginkgo -focus "\[It\] Example example pass". It still skips.
Will run 0 of 1 specs
S
Ran 0 of 1 Specs in 0.000 seconds
SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 1 Skipped
Only when I remove the [It] prefix does it select the correct test, ginkgo -focus "Example example pass"
Will run 1 of 1 specs
•
Ran 1 of 1 Specs in 0.000 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS
Is there a better way to select the tests?
For background, trying to select the failed tests from the report and rerun them but selecting by test case name doesn't appear to work, as above.
The text was updated successfully, but these errors were encountered:
yes you'll need to strip the [It] from the test name. The full test name is just the concatenation of the container strings and the It string however for historical reasons that don't make too much sense any more, the JUnit report adds [It], however I'd rather not change that as it might break users who have come to rely on it/expect it.
This section of the docs lists all the ways you can filter specs.
Minimal example
If I run
ginkgo
normally, the test runs and passes. Usingginkgo --junit-report=junit.xml
to produce junit report I see the name of the test has been generated.If I use the full testcase name as the argument for
-focus
e.g.ginkgo -focus "[It] Example example pass"
the test gets skipped.If I escape the
[
and]
e.g.ginkgo -focus "\[It\] Example example pass"
. It still skips.Only when I remove the
[It]
prefix does it select the correct test,ginkgo -focus "Example example pass"
Is there a better way to select the tests?
For background, trying to select the failed tests from the report and rerun them but selecting by test case name doesn't appear to work, as above.
The text was updated successfully, but these errors were encountered: