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

Option for no backtrace #2112

Open
kylecoberly opened this issue Aug 15, 2022 · 3 comments
Open

Option for no backtrace #2112

kylecoberly opened this issue Aug 15, 2022 · 3 comments
Labels
plugins-usecase A use case that could potentially by served by our nascent plugins concept ⚡ enhancement Request for new functionality

Comments

@kylecoberly
Copy link

🤔 What's the problem you're trying to solve?

I'm trying to use the @playwright/test expect assertion library with Cucumber, and I have no need for the stack trace. Expect already gives me Playwright-specific trace of what lead to the failure, the Cucumber stack trace just shows me where I wrote the assertion.

✨ What's your proposed solution?

Add on "off" value to the existing --backtrace option.

⛏ Have you considered any alternatives or workarounds?

I read some stuff about regexing to filter out the traces or use additional plugins to take them out, but I'm trying to teach other people how to do this on all of their projects and that's an awful lot of hoops for a clear need.

📚 Any additional context?

image

Playwright + Playwright Expect + Cucumber seems like a pretty 💯 stack, I feel like this would be useful to more people than just me.


This text was originally generated from a template, then edited by hand. You can modify the template here.

@davidjgoss davidjgoss added the ⚡ enhancement Request for new functionality label Aug 15, 2022
@davidjgoss
Copy link
Contributor

davidjgoss commented Aug 15, 2022

Interesting one @kylecoberly, thanks for raising.

I think customisation of how errors and stack traces are displayed is a good candidate for something a plugin could do, which is a concept we're kind of fleshing out at the moment.

Coincidentally the next thing I'm going to be looking at is our handling of errors and stack traces, so I'll keep this in mind and see what's feasible.

cc @mattwynne

@kylecoberly
Copy link
Author

Here's another example:

image

This one is Cucumber + supertest. The stack trace is supertest's code, not my app's. The same thing happens with expect:

image

@mattwynne
Copy link
Member

Interesting, yeah.

If you had an extension point that allowed you to wrap the invocation of a step, the plugin could intercept and modify the backtrace there.

@davidjgoss davidjgoss added the plugins-usecase A use case that could potentially by served by our nascent plugins concept label Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugins-usecase A use case that could potentially by served by our nascent plugins concept ⚡ enhancement Request for new functionality
Projects
None yet
Development

No branches or pull requests

3 participants