question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allure Report: Wrong default order of TestNG DataProvider cases

See original GitHub issue

I’m submitting a …

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

Wrong case order in allure-report.

Steps to reproduce:

  1. Create any TestNG test class with @DataProvider and @Test methods. E.g.:
public class DataProviderTest {

    @DataProvider
    public Object[][] args() {
        return new String[][]{{"One"},{"Two"},{"Three"},{"Four"},{"Five"}};
    }

    @Test(dataProvider = "args")
    public void test(String arg) {
        System.out.println(arg);
    }
}
  1. Run tests with Allure 2 enabled.
  2. Generate Alllure 2 report.
  3. Open report and look at cases default order (for parameters): Five, One, Three, Two, Four.

What is the expected behavior?

Cases order should correspond to run order: One, Two, Three, Four, Five.

What is the motivation / use case for changing the behavior?

Our Allure report should show cases in the order as they run.

Please tell us about your environment:

Allure version 2.x
Test framework testng@6.10
Allure adaptor allure-testng@2.0-BETA21
Generate report using allure-maven@2.9
Report version 2.0.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
FluffyWeirdOcommented, Feb 22, 2018

Is there a way to set the default order by attribute? Say I would like to always have them ordered by the Order field

1reaction
marvelfrozencommented, Feb 5, 2018

The order number is not in order because you use ordering by name. Use ordering by number by clicking “order”. image

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Allure TestNG: Custom test method names while using ...
I have tests that are using @DataProvider. My test implements ITest to change the test method instance name during runtime. When I run...
Read more >
Allure Report Selenium and TestNG Tutorial
Allure Report Selenium and TestNG integration will be explained in all details. Allure is a test reporting framework from Yandex Team.
Read more >
Preserver Order in Testng - Selenium Easy
In TestNg bydefault the preserve-order attribute will be set to 'true', this means, TestNG will run your tests in the order they are...
Read more >
Removing Parameters in Allure Reports | by Rommel Malqued
Parameters passed as arguments on testNG test method. So I've been working on this project and I needed to data drive my tests...
Read more >
TestNG Report Generation in Selenium WebDriver - H2k Infosys
Allure serve C:\Users\admin\eclipse-workspace\AllureReporting\allure-results. It will automatically generate the Allure Reports. Facebook ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found