-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Serenity Console reporter improvements #2244
Comments
And also I think running |
Nice catch; thanks for reporting! I'll need to investigate that! (Unless you already have an idea for a fix, in which case PRs are also very welcome) |
I can work on that one in free time, but I don't have any implementation in mind and I'm not doing any cookie-licking, so feel free to investigate that yourself. |
Ok, I figured it out (I guess). Turns out that Playwright's wrapper for reporters expects onError method from custom reporter, and that's something SerenityReporterForPlaywrightTest doesn't have. Now to Serenity's part @jan-molak , do you have a reliable way to test serenity's console reporter? (gonna also change to my main account, I want to have first real contribution well documented on my GH account 😄 ) |
Nice! OK, so Serenity/JS uses serenity-js/packages/playwright-test/src/reporter/SerenityReporterForPlaywrightTest.ts Line 71 in 30bda10
That's where we'd need the onError handler.
However, Serenity/JS also decouples the process of extracting the data from reporting by emitting domain events. For example, you have a Playwright docs state that
I assume this means that the handler should be invoked at most once. If it does, then Regarding testing, you can simulate error conditions and how a global error is picked up by the To test the Any questions just let me know! And thanks for offering to help out 👍 |
Alright, alright. I decided to create a new Domain Event for that - GlobalExceptionEncountered. I guess it would be clearer in StreamReporter. I'll try as well your approach with emitting this during onEnd, but... I wanted to run this to just see how it works, but I can't get it working with my new event type and building throws me an error complaining it doesn't know this type. I couldn't find it on the Contribute docs, any tips? 😄 |
Haha, sure. You're digging deep into the heart of Serenity/JS :-) What's the error you're getting? Any stack trace you could share? If you want, feel free to open a draft PR and we can discuss there. |
added a draft PR. I'm more of a fan of trying to do and try things several times so I can see what sticks. The problem is that my new Domain Event I created in core package is not recognised by console-reporter package. What should I run to mak those packaged sync between each other? |
Fixed by #2252, released in Serenity/JS 3.19.0 🚀 |
… the FileSystem being able to directly read files from the file system in crew members should enable services like the ConsoleReporter to display code snippets and will enable refactoring the artifact handling mechanism in the SerenityBDDReporter Related tickets: re #2244
What happened?
Hello,
during developement a Typescript's ReferenceError was introduced in the testing project, because of merging two branches issues. Inside Playwright's describe there is a function setting up Actors, but because it was change, error above was introduced.
Because of my policy of keeping reporter output to minimal, I disabled Playwright's line native reporter and left mostly serenity reporters
Because of that, test run failed with no tests visible and without any info about the error
What did you expect to happen?
I expected to get an error like in Playwright line reporter
Node.js version
v18.12.1
Execution environment
No response
How to reproduce the bug.
create something that creates Typescript error inside description group test, but outside test itself, f. ex. add foo()
Serenity/JS version
The text was updated successfully, but these errors were encountered: