Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Display OneTimeSetUp in report #14

Closed
Saureg opened this issue Sep 7, 2018 · 3 comments
Closed

Display OneTimeSetUp in report #14

Saureg opened this issue Sep 7, 2018 · 3 comments

Comments

@Saureg
Copy link

Saureg commented Sep 7, 2018

Hello!

What you can say about showing up OneTimeSetup in report (I mean display OTS in test case near simple SetUp like at image below)
img

Also in current realization there is no link between test cases and OTS methods and if OTS fails it doesn't show at a report

unickq added a commit that referenced this issue Sep 7, 2018
@unickq
Copy link
Owner

unickq commented Sep 7, 2018

Need to say that it's impossible to reach results of SetUp/TearDown methods directly from Test. Same for OneTime. This lib uses Action Attributes Approach and can parse test output in order to get SetUp/TearDown issues. But it can't be done for OneTimeSetUp/OneTimeTearDown.

Release 1.0.4-beta24:

  • [OneTime] Attributes added as steps. No results, not execution time - just a method name.
  • Console Output is now an allure attachment - much more readable 😉
  • AllureExtensions.WrapSetUpTearDownParams for SetUp/TearDown/OneTimeSetUp - ability to change step name and add its execution time.
  • OneTimeTearDown is just a step without result 😞 . Obviously if OneTimeSetUp is failed there won't be any results at all (Action Attributes Approach) - but it's untrackable for OneTimeTearDown

Example:

[TearDown]
public void TearDown()
{
     AllureExtensions.WrapSetUpTearDownParams(() =>
     {
          Thread.Sleep(750);
          Console.WriteLine("Example of wrapped TearDown");
     }, "Custom TearDown name here");
}

screenshot_2

@unickq
Copy link
Owner

unickq commented Sep 17, 2018

@Saureg did that work for you?

@unickq
Copy link
Owner

unickq commented Sep 20, 2018

@unickq unickq closed this as completed Sep 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants