smartystreets / goconvey

Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.
http://smartystreets.github.io/goconvey/
Other
8.24k stars 555 forks source link

Integration with Cucumber BDD framework #480

Open l3pp4rd opened 7 years ago

l3pp4rd commented 7 years ago

Hi, I'm the author of godog - cucumber for golang BDD framework and a member of cucumber team.

I like to use goconvey and I was thinking whether it would be reasonable to add an extension to goconvey which would consume gherkin language based output and extract that into the UI related tests.

godog integrates nicely into go test command and due to -v option can produce the output, which could be parsed by goconvey into the executed test list. The code coverage works well already.

Concerning performance, that could be managed without an impact, by checking whether there is a godog package used somewhere in the tests. The output could be muted in case if there is any error while parsing it, in order to prevent accidental issues, which could intervene the work of goconvey.

This is so far just an idea, no actual work done. I'm not sure, but maybe there could be or there are some extension points already in goconvey for such a task?

riannucci commented 7 years ago

I'm not super-familiar with gherkin/cucumber, but the goconvey web UI does have a 'compose' button (very top right corner of the UI, looks like a pen and paper). Pasting the example gherkin from here generates goconvey boilerplate.

I'm not sure if that's really what you're asking for though?

l3pp4rd commented 7 years ago

hi @riannucci the compose option is not about it, the issue is about execution results. When goconvey runs go test -v it scrapes the output in order to provide results in dashboard:

  1. For BDD based specs - goconvey into stories displayed in dashboard.
  2. For standard go tests.
  3. wish to have an extension point here, to scrape cucumber test output into stories which would be displayed in the dashboard the same way as goconvey stories.

I think it may be useful for various testing frameworks which integrates in go test command to use goconvey in order to provide instant results in dashboard.

2017-06-08-110427

This is an example, where the output of cucumber feature execution is not translated in goconvey, but it could be translated into the story.

njagadee commented 6 years ago

Is there a way to integrate gocovey with godog gherkin language?

MadameSheema commented 5 years ago

Is there any update about this? 😊