Closed brobee closed 6 years ago
It seems, I could solve some problems. I removed cucumber-picocontainer and the ObjectFactory problem has been solved and increased the serenity code version number. Tests are run, but the serenity html report is empty. 0 tests
I found some example, where serenity helper class is implemented. In my case, I did not implement such a class, just use the cucumber steps and features files. It can be fine, or need to implement that? Thanks!
You will find a basic introduction to Cucumber with Serenity here: http://thucydides.info/docs/articles/an-introduction-to-serenity-bdd-with-cucumber.html. In a nutshell, Serenity is an ObjectFactory, so you can't combine it with other ObjectFactory libraries, and yes, Serenity will only generate reports when you run the tests through Serenity.
Thank you for your quick response. ObjectFactory problem is gone, I found the solution, cucumber-picocontainer was the problematic part. Could you please clarify what does 'run the tests through Serenity' mean? (I'm checking the site what you mentioned) Right now, I run maven test command and the test are running fine, except the report. Thanks!
You need to use @RunWith(CucumberWithSerenity.class)
instead of @RunWith(Cucumber.class)
It has been changed, before my post. My final question is, is it necessary to use serenity for reporting purposes without serenity Steps library? I have well defined step definitions, huge amount of page objects, utility classes and there is no point (and time :) ) to build another abstraction level top of the step definitions. What do you think?
Serenity considers @Given @When @Then etc as steps. Extra step layers are for documentation and clarity, but they are optional.
Presuming this question answered.
I've already had a cucumber framework and I would like to use cucumber-serenity for reporting purposes. Could you please tell me what's wrong with it? Thank you, appreciate it!
My console error:
Here is my test runner class:
This is my pom.xml: