Package net.jangaroo.jooc.mvnplugin.test
Class JooGenerateTestAppMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- net.jangaroo.jooc.mvnplugin.AbstractSenchaMojo
-
- net.jangaroo.jooc.mvnplugin.test.JooGenerateTestAppMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="generateTestApp", defaultPhase=PROCESS_TEST_CLASSES, requiresDependencyResolution=TEST, threadSafe=true) public class JooGenerateTestAppMojo extends AbstractSenchaMojoExecutes JooUnit tests. Unpacks all dependency to its output directory, generates a tests app which runs the script 'run-tests.js'. This runs JooUnit's BrowserRunner with the given TestSuite. Then the Test Mojo starts a Jetty on a random port betweenjooUnitJettyPortLowerBoundandjooUnitJettyPortUpperBoundand prints out the resulting test app URL.Tests are executed in one of three ways:
- If available, PhantomJS is started with a script that loads the test app and stores the test result in the report file in XML format.
-
Otherwise, the Mojo tries to start a browser via the Selenium server given by
jooUnitSeleniumRCHostwith the test app URL and tries to collect the test result through Selenium. -
Another option is to set the system property
interactiveJooUnitTests(mvn test -DinteractiveJooUnitTests), which simply halts Maven execution and gives you the opportunity to load and debug the test app in a browser.
jooUnitTestExecutionTimeout(ms) and interrupt the tests after that time, resulting in a test failure.
-
-
Field Summary
Fields Modifier and Type Field Description protected FiletestOutputDirectoryDirectory whose joo/classes sub-directory contains compiled test classes.-
Fields inherited from class net.jangaroo.jooc.mvnplugin.AbstractSenchaMojo
APP_MANIFEST_CROSS_MODULE_MERGE_STRATEGY, APP_MANIFEST_LOCALIZATION_MERGE_STRATEGY, project, session
-
-
Constructor Summary
Constructors Constructor Description JooGenerateTestAppMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()-
Methods inherited from class net.jangaroo.jooc.mvnplugin.AbstractSenchaMojo
getAppDirOrJar, getAppManifestFileNameForLocale, getAppManifestFragmentFileNameForLocale, getArtifactFile, getExtFrameworkArtifactPattern, getExtFrameworkArtifactRegexp, getInputStreamForDirOrJar, getManifestEntries, getRootApp, getSenchaJvmArgs, getSenchaLogLevel, getToolkit, isExtFrameworkArtifact, isExtFrameworkDependency, prepareAppManifestByLocale, prepareFile
-
-
-
-
Field Detail
-
testOutputDirectory
@Parameter(defaultValue="${project.build.testOutputDirectory}") protected File testOutputDirectoryDirectory whose joo/classes sub-directory contains compiled test classes.
-
-