Comments (7)
that would be great @CodeWriterDavid concerning JUnit formatter and a fix to outlines. I personally do not use outlines as it somehow reads harder and that may be the reason for having it incomplete.
What is your opinion about #13 returning errors in hooks?
from godog.
OK, great! I like outlines when there are a lot of similar examples, as it makes missing coverage much more obvious. But I certainly understand how you wouldn't have noticed this issue if you don't use them. :) Regarding the returning of errors in Before/After hooks, I like the idea of having them be like any other step (and also more idiomatic in terms of Golang's error-centric approach), but depending on how those errors are handled by the runner, it might not make much of a practical difference. Before/After are for setting up state, and if there is a failure there isn't much you can do but grind to a halt. It doesn't make sense to try to run any additional tests, as the state of the domain system is now unknown and unreliable. The one area it might make a difference would be reporting, if returning errors instead of panics would allow the runner to better report the current failure and wrap up the reporting of the tests run up to that point. On the other hand, panics are pretty telling with a stack trace. :)
from godog.
Yes, concerning errors on return, I agree, it does not make sense to try to continue running because these hooks are meant to manage/reset state. I think I'll keep it as is for now, until the obvious behavior pops in from context or someone proposes something to suit it better ;) thanks for the opinion
from godog.
hey @CodeWriterDavid maybe you could open a pull request with jUnit formatter and I'll hunt the bug?
from godog.
Hi, @l3pp4rd -- I already have a fix for the bug, I was just hoping to have a set of tests to go with it and it was taking me a bit to figure out how to best do that with the existing test setup. Very cool, by the way, how you use godog to test itself! If you don't need tests, I can have a pull request fairly soon.
from godog.
Ah great, thought that jUnit formatter can fade away if you are busy :) good to know you are still around, take your time ;)
from godog.
hi @dasnook I've merged your junit implementation and adapted it based on Behat junit output they have spent much time to find nicest way of formatting results. Also I have fixed the issue where background was not being printed together with scenario outline. cheers
just run godog -f junit > junit.xml
from godog.
Related Issues (20)
- Add support for cucumber expressions HOT 5
- Replace the generic Step function with Given/When/Then functions to match the majority of other languages HOT 14
- screen shot in _examples/api is now wrong HOT 4
- Support for Go 1.20
- runAfterScenarioHooks invoke twice when step failed that is not the last step HOT 4
- Enhancement to allow to skip a test from the code HOT 8
- Background Outline HOT 2
- Setting option `Concurrency = 2` fails when running the Example HOT 1
- click on run tests but tests are not running HOT 1
- Please update the concurrency paragraph in the docs to clarify if scenario outlines run in parallel or only the scenarios HOT 1
- Is this feature file in godog/_examples/godogs running sequencially ? HOT 2
- Why Getting total scenarios as 6 while I am having total 5 scenarios HOT 3
- Skipping a test by returning `godog.ErrSkip` does not work? HOT 4
- print error stack when panic
- step function support return a nil Context with error HOT 1
- Conflict between global flags set by godog.BindCommandLineFlags and spf13/cobra HOT 1
- HELP: I want to know the index of a scenario in a scenario outline in the before scenario hook.
- Can't navigate to step definition from Gherkin step
- Unexpected step line values in cucumber report generated by Godog for scenario outlines
- ReadMe add step `go get ...` see provided patch to fix it
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godog.