java - How can I run my Selenium tests with Maven? -
this question has answer here:
i'm trying figure out how run selenium webdriver tests without having use eclipse or intellij or other ide. java development using plain text editor, , don't want have install (and learn) ide sake of compiling , running tests.
i've tried following selenium documentation, stops short of telling how run tests command line.
my brief experience maven amounts following:
$ mvn compile <snip> no sources compile $ mvn test <snip> no tests run $ mvn run <snip> invalid task 'run'
the other 1 know mvn jetty:run
doesn't seem right i'm not wanting run new web server.
i suspect need set correct targets etc in pom.xml, don't know should be, , surprisingly can't find online.
can please?
in short:
mvn integration-test
or mvn verify
thing you're looking for.
explanation
the goals, you're invoking, lifecycle phases of maven (see maven lifecycle reference). mvn test
intended standalone unit tests, mvn integration-test
runs after compiling, testing , packaging. phase, invoke selenium tests. if need start , stop jetty, tomcat, jboss, etc., bind start/stop of these pre-integration-test
, post-integration-test
.
i run integration-tests using failsafe , perform there invocations selenium , other integrative tests.
Comments
Post a Comment