playwright-dotnet icon indicating copy to clipboard operation
playwright-dotnet copied to clipboard

[Feature] Add screenshot, video, tracing on/off/on-failure to NUnit/MSTest

Open mxschmitt opened this issue 2 years ago • 10 comments

mxschmitt avatar Jul 18 '22 21:07 mxschmitt

Any ETA for this please?

enisak avatar Aug 29 '22 09:08 enisak

Any ETA for this please?

@enisak we can't give any official eta (but I think we are able to deliver it in 1.27 and maybe 1.26) it's the next thing I'm working on.

mxschmitt avatar Aug 29 '22 09:08 mxschmitt

Hi Folks, Merry Christmas to all. I'm wondering if the plan for this feature request is to deliver it as a Christmas gift to all. But if not, do we have an ETA? Last ETA was 1.26 or 1.27. Looks like we are passed that now. Thank you

markoueis avatar Dec 23 '22 22:12 markoueis

Just want to add that I use Playwright for automating scenarios other than e2e tests, so if this could be applied in Playwright itself and not Playwright.NUnit it would solve a request from me.
Should I open a different issue or will this be addressed by this one?

akamud avatar Jan 13 '23 11:01 akamud

Being able to define the trace options via settings file that can be scoped by environment would be a very useful feature here. I guess it's part of a wider feature of being able to define playwright settings similarly to the JS version with environment scoped values. Currently using the .runsettings solution for running locally in VS but for running in CI it would be great to be able to have scoped settings.

CameronMackenzie99 avatar Mar 15 '23 13:03 CameronMackenzie99

Would you mind to share your current solution for such task?

I have these two ideas:

  • Trace everything, but save only the failed cases.
  • Turn on tracing only on retries.

tesar-tech avatar Sep 09 '23 15:09 tesar-tech

Any ETA for this please? 👍🏻

TheJackGower avatar Jan 17 '24 10:01 TheJackGower

I think this feature is already there https://playwright.dev/dotnet/docs/trace-viewer-intro , am i missing anything ?

To do it now.. we are using this workaround

Start the trace always but stop it only if there is a failure or if the flag is set to capture it

    if(TestContext.CurrentContext.Result.Outcome.Status.ToString()=="failed" || tracingStatus = true)
    {
     // stop the trace
   }
  

gauravkhuraana avatar Feb 29 '24 07:02 gauravkhuraana

Your link is linking to some other url. ~~Regarding the question I would say the issue is 70% solved.~~

~~There ist still no video capture functionality.~~

Sorry misread the issue myself. This is about adding a functionality to only capture a trace when a test failed.

Probably by repeating the test automatically and capturing the trace then. So there are only traces of failed tests.

DanielHabenicht avatar Feb 29 '24 14:02 DanielHabenicht

Your link is linking to some other url. ~Regarding the question I would say the issue is 70% solved.~

~There ist still no video capture functionality.~

Sorry misread the issue myself. This is about adding a functionality to only capture a trace when a test failed.

Probably by repeating the test automatically and capturing the trace then. So there are only traces of failed tests.

Edited my reply and included the workaround we are using, thanks for pointing the actual ask

gauravkhuraana avatar Feb 29 '24 15:02 gauravkhuraana