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

Fail :: TestOutcomes outcomes = TestOutcomeLoader.loadTestOutcomes().inFormat(format) #2354

Closed
viniciusmorais opened this issue Jan 7, 2021 · 5 comments
Labels

Comments

@viniciusmorais
Copy link

This code line doesn't work in Serenity version 2.3.10

TestOutcomes outcomes = TestOutcomeLoader.loadTestOutcomes().inFormat(format)

@wakaleo
Copy link
Member

wakaleo commented Jan 7, 2021

Could you be more precise?

@viniciusmorais
Copy link
Author

I'm trying to do like the documentation : https://serenity-bdd.github.io/theserenitybook/latest/importing-test-outcomes.html

But I have a erro: TestOutcome cannot be resolved to a type.

This comand TestOutcomeLoader.loadTestOutcomes().inFormat(format) return TestOutcomeLoaderBuilder, not a TestOutcomes.

@wakaleo
Copy link
Member

wakaleo commented Jan 7, 2021

Use JSON instead of XML - XML output is deprecated.

@viniciusmorais
Copy link
Author

I'm using JSON...

@After
public void testOutcomes() {
	OutcomeFormat format = OutcomeFormat.JSON;
	TestOutcome outcomesBuilder = TestOutcomeLoader.loadTestOutcomes().inFormat(format);	
}

@wakaleo
Copy link
Member

wakaleo commented Jan 12, 2021

You need to say where you are loading the reports from, e.g.

TestOutcomes testOutcomes = TestOutcomeLoader.loadTestOutcomes().inFormat(OutcomeFormat.JSON).from(someDirectory));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants