As I continue to write more Selenium tests using specs2, I find that
one spec depends on another spec to do it's job. While you may argue
that specs should all be independent, I am exploring the idea that for
full system test (as in selenium tests), it is ok to have them depend
on each other,
So I have
createCategoriesSpec
which should run before
createOptionsSpec
and in the 3rd place it should run
createItemSpec
I think that all I need is to setup a suite, and call them in order,
but I didn';t find anything about this on the user guide (maybe I
didn't use the right keywords) And if it makes any difference, I run
my tests using sbt by simply call
$ sbt test
Thanks
Diego
--
Diego Medina
Web Developer
(305) 788-4954
di...@fmpwizard.com
http://www.fmpwizard.com
Then, if you add both "sequential" and "stopOnFail" arguments, they are going to be executed in the order of declaration and the next spec won't be executed unless the previous one passes:"These are the selenium specifications" ^
include(childSpec1, childSpec2, childSpec3)
Now, in order to run this with sbt you need to use name conventions where the child specifications are not executed and only the composite one is. With sbt 0.10, this is adding this kind of expression to your build.sbt file:
sequential ^ stopOnFail ^"These are the selenium specifications" ^
include(childSpec1, childSpec2, childSpec3)