-
Notifications
You must be signed in to change notification settings - Fork 228
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
Configuration to exclude SKIPPED tests in Allure Report #412
Comments
@baev |
A few months ago, I was looking for the same option, to remove skipped tests from the Allure statistics. Couldn't find it, so I ended writing my own statistics to display in the report email and slack channel, but the problem that if somebody clicks on the Allure report link it shows wrong numbers. So, yeah, it would be great to have it as part of the Allure report. |
I have similar issue, such configuration option would be a blast. |
Also need this config, too. |
yes please i need it too. |
Тоже очень нужна данная функция. Думал, что @muted должен это делать, но нет. Схожие запросы есть с 2017 года. Не хочется какие-то свои велосипеды горадить. |
Is there any workaround to solve this for the time being? |
@shridharkalagi, yes, instead of using @Disabled/@ignore annotations (or any other annotation you might use in your framework to skip tests) I add tag "ignored" to the tests I want to ignore/skip. Like this @tag("ignored"). Now, when you run your tests just don't run tests with that tag "ignored". This way no ignored tests will be shown in Allure reports, but they are also won't be part of your total tests that you run. If it’s fine for you, it can be a workaround to keep Allure statistics cleaner. |
I also need this functionality |
any news here? |
Yeah, we need the same functionality. On our project, we need to skip tests on condition and would be nice for them not to appear in the report as the statistic of run shows wrong numbers |
same here. please add this functionality or some workaround (in Java) |
you can use hook in conftest.py, following is the code sample: def pytest_collection_modifyitems(items, config):
|
Thanks but I mean in Java |
what is the configuration! |
Good to have this configuration option in allure |
After spending more than two weeks and a long shell script that worked on my local runs, but failed on jenkins... this is what finally worked for me. Just two lines of code: cd $PWD/target Note: You need https://plugins.jenkins.io/postbuildscript/ jenkins post build and it needs to go right before Allure Report post build. Also, this is only removing the allure json result file that has the skipped status. You can still view the skipped results in the testng or junit reports. |
We also need such a configuration. |
Just use bash to remove skipped tests from the test results before report generation step: grep -rl '"status": "skipped"' allure-results | xargs rm -rf |
Ok, so i encountered a similar problem recently - ui tests that should be ignored with a specific configuration (e.g. specific browsers)through annotations are marked as Skipped, are displayed in TestOps report and included in the run statistics. Using Ignore or tags was not an option because as mentioned before, one test is executed in different configs. After a bit of debugging i found a solution that suites our case - cancel the default behaviour of
This will affect those cases when skipping tests is allowed in your test run and expected in stats. |
I need this functionality too |
Need this config badly! |
Also need this config. |
BTW, there is an option for TestNG integration to hide disabled tests from the report. See https://allurereport.org/docs/testng-configuration/#alluretestnghidedisabledtests From what I see, there are multiple different requests from the community:
I suggest only discussing the number one within the scope of the issue. |
After internal discussion, we decided to change the behaviour unconditionally and exclude In case of positive feedback from the community, we'll propagate the change to Allure TestOps as well. |
released as 2.25.0 |
@baev I've downloaded the released version from https://github.com/allure-framework/allure2/releases/download/2.25.0/allure-2.25.0.zip and generated a report on a local machine but I still have the same results as before |
I have also updated it to 2.25.0 and skipped tests are still being included in the summary. |
Could anyone confirm that clearing the cache helps? I tried clearing the cache / opening the page in incognito, but disabled tests continue to be taken into account. |
it doesn't work for me I cleared the cache but it still accounts for skipped tests. |
Could you please check https://baev.github.io/testng-java-maven/5/# ? It shows 100% for me, ignoring unknown & skipped statuses in the success rate calculation (source code https://github.com/baev/testng-java-maven ) |
Can confirm it shows 100%. I checked it on the browser where I tried to open my reports. |
After some research I managed to find the source of the problem. Allure Gradle plugin 2.11.2 with default configuration generates a report with disabled statuses included. @baev can we configure AGP to fix this? |
allure {
version.set("2.25.0")
} |
I'm submitting a ...
What is the current behavior?
Current behavior is Allure Tests include skip tests as well
If the current behavior is a bug, please provide the steps to reproduce and if possible a
I have a total of 3 tests out of which 1 PASS, 1 FAIL & 1 SKIPPED
When I generate allure report, it says -
Total - 3
Pass - 1
Fail - 1
Skipped - 1
Pass percentage - 33.33%
What is the expected behavior?
There should be a way to ignore the Skipped test cases. It will be good to have a configurable parameter to calculate the percentage. In my case I would like the pass percentage to be 50% as the Skipped test did not execute
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Other information
Please let me know if there is already a way to configure this
The text was updated successfully, but these errors were encountered: