Skip to content
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

allure-results not creating with main method #2597

Open
1 task done
ishubhamjain opened this issue Jun 12, 2024 · 3 comments
Open
1 task done

allure-results not creating with main method #2597

ishubhamjain opened this issue Jun 12, 2024 · 3 comments
Labels
triage type:bug Something isn't working

Comments

@ishubhamjain
Copy link

ishubhamjain commented Jun 12, 2024

Describe the Bug

I have set the allure.properties as allure.results.directory=./allure-results and place it at location "src/test/resources"

When I am running my tests from with testng.xml it works but when I run with this main method these allure-results is NOT creating while the TestNG test-output folder is creating successfully

I have tried passing the flag in command, setting System.setProperty("allure.results.directory", path); but it's not working as expected

Steps to Reproduce

          <properties>
              <allure.version>2.27.0</allure.version>
              <aspectj.version>1.9.22.1</aspectj.version>
          </properties>
    
         <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-testng</artifactId>
            <version>${allure.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-java-commons</artifactId>
            <version>${allure.version}</version>
            <scope>compile</scope>
        </dependency>
        
// Run the test with this Runner class
public class Runner {
    public static void main(String[] args) {
        TestListenerAdapter tla = new TestListenerAdapter();
        TestNG testng = new TestNG();
        List<String> suites = Lists.newArrayList();
        suites.add("testng.xml");
        testng.setTestSuites(suites);
        testng.run();
    }
}

Expected Behaviour

It should create an allure-results folder with the jar as well on the same project directly as the path set to allure.results.directory=./allure-results

Screenshots or Additional Context

No response

What Language are you using?

Java

What Framework/Allure Integration you are using?

allure-testng

What version of Allure Integration you are using?

2.27.0

What version of Allure Report you are using?

2.27.0

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ishubhamjain ishubhamjain added triage type:bug Something isn't working labels Jun 12, 2024
@akila0791
Copy link

Place allure.properties file in the folder where jar is present.

@ishubhamjain
Copy link
Author

@akila0791 it's not working either with placing file in the folder where jar is present.

@ishubhamjain ishubhamjain changed the title allure-results not creating with jar allure-results not creating with main method Jun 20, 2024
@DTPiotr
Copy link

DTPiotr commented Jul 18, 2024

outputFolder: "my-allure-results"

  • this parameter doesn't work, results are created in default folder

no idea if it's related to this ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants