Closed SiKing closed 4 years ago
hmm.. I always use instrumented()
because that's the only one I knew about. I may have found it here http://serenity-bdd.info/docs/articles/screenplay-tutorial.html These methods seem to do pretty much the same thing? return stepFactory.getUniqueStepLibraryFor(instanceClass, constructorParameters)
The difference is
StepFactory.getFactory()
in Instrumented
StepFactory.getFactory().usingPages(pages)
in Tasks
Tasks
seems specific the screenplay pattern, so I guess it's the preferred one? @wakaleo
The tutorial you linked is what I was starting from. That is where I found both forms.
The code has evolved, but you can use either form - one is a shortcut for the other.
I guess I will go with what @globalworming said: "Tasks seems specific the screenplay pattern"
Most of the example code for writing a
Task
return something like:citation
The example code that is created with the command
mvn archetype:generate -Dfilter=screenplay
has:Both forms seem to work, at least in version 2.2.2 of serenity-core. Is one preferred over the other?