Florian Hars
unread,Mar 19, 2014, 9:38:32 AM3/19/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to scalate...@googlegroups.com
I started to use the scalatest selenium DSL with sbt to write some
tests for an existing web application. The overall structure
is that I have
FlatSpec with Eventually
with BeforeAndAfter with BeforeAndAfterAll
with ShouldMatchers with WebBrowser
for each module, each instantiated once with Firefox and with Chrome.
In the "beforeAll()" method I log in to the application, and in "before"
I "go to" the start page for each module and then run the tests from
there.
This works like a charm if I start the tests by typing "sbt test" into a
terminal (usually with the DISPLAY set to some xvnc4server display), or
if I start jenkins from a terminal and then call "sbt test" in a jenkins
build script.
But if I deploy jenkins under tomcat7 (and give the tomcat7 user write
permissions for its home directory, so the browsers actually run), the
tests only work up to the first "go to" (or goTo, that makes no difference)
call. That request will be submitted, too, but with a completely clean
slate, so the application sees this as a new, unauthenticated request and
serves up another login form. The behaviour is the same for firefox and
for chrome (chromium, actually).
Any ideas why "go to" behaves so differently if used by different users,
or what else may cause this behaviour?
Thanks, Florian.