@Mojo(name="test",
defaultPhase=TEST,
requiresDependencyResolution=TEST)
public class TestMojo
extends AbstractJasmineMojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
browserVersion
Deprecated.
Use the webDriverCapabilities parameter instead.
|
protected String |
format
Determines the format that jasmine:test will print to console.
|
protected boolean |
keepServerAlive
Keep the server alive after the
jasmine:test goal exists. |
protected PhantomJsOptions |
phantomjs
Configure which version of PhantomJS should be used and how it should be found.
|
protected List<Capability> |
webDriverCapabilities
Web driver capabilities used to initialize a DesiredCapabilities instance when creating a web driver.
|
protected String |
webDriverClassName
Determines the Selenium WebDriver class we'll use to execute the tests.
|
autoRefreshInterval, coffeeScriptCompilationEnabled, connectorClass, customRunnerConfiguration, customRunnerTemplate, debug, fileSystemReporters, haltOnFailure, jasmineTargetDir, manualSpecRunnerHtmlFileName, mavenProject, mvnTestSkip, preloadSources, reporterRetriever, reporters, resourceRetriever, serverHostname, serverPort, skipJasmineTests, skipTests, sourceEncoding, sources, specDirectoryName, specRunnerHtmlFileName, specRunnerTemplate, specs, srcDirectoryName, stringifiesStackTraces, timeout, uriScheme| Constructor and Description |
|---|
TestMojo(org.eclipse.aether.RepositorySystem repositorySystem) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
void |
run() |
getAutoRefreshInterval, getBasedir, getConnector, getContexts, getCustomRunnerConfiguration, getCustomRunnerTemplate, getFileSystemReporters, getJasmineTargetDir, getMavenProject, getPreloadSources, getProjectClassLoader, getReporters, getSourceEncoding, getSources, getSpecDirectoryName, getSpecRunnerTemplate, getSpecs, getSrcDirectoryName, isCoffeeScriptCompilationEnabled, isSkipTestsgetLog, getPluginContext, setLog, setPluginContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLog@Parameter(defaultValue="org.openqa.selenium.phantomjs.PhantomJSDriver") protected String webDriverClassName
Some valid examples:
@Parameter protected List<Capability> webDriverCapabilities
Web driver capabilities used to initialize a DesiredCapabilities instance when creating a web driver.
Capabilities value can be either a String, a List, or a Map.
Example:
<webDriverCapabilities>
<capability>
<name>phantomjs.binary.path</name>
<value>/opt/phantomjs/bin/phantomjs</value>
</capability>
<capability>
<name>phantomjs.cli.args</name>
<list>
<value>--disk-cache=true</value>
<value>--max-disk-cache-size=256</value>
</list>
</capability>
<capability>
<name>proxy</name>
<map>
<httpProxy>myproxyserver.com:8000</httpProxy>
</map>
</capability>
</webDriverCapabilities>
@Parameter(defaultValue="FIREFOX_17") @Deprecated protected String browserVersion
Determines the browser and version profile that HtmlUnit will simulate. This setting does nothing if the plugin is configured not to use HtmlUnit.
This maps 1-to-1 with the public static instances found in BrowserVersion.
Some valid examples: CHROME, FIREFOX_17, INTERNET_EXPLORER_9, INTERNET_EXPLORER_10
@Parameter(defaultValue="documentation") protected String format
Determines the format that jasmine:test will print to console.
Valid options:
@Parameter(property="phantomjs",
defaultValue="${phantomJs}")
protected PhantomJsOptions phantomjs
Configure which version of PhantomJS should be used and how it should be found. The core of the phantomjs-maven-plugin is used to provide this functionality and this parameter should match the configuration of the phantomjs-maven-plugin install goal.
Default Options:
<phantomjs> <version>2.0.0</version> <checkSystemPath>true</checkSystemPath> <enforceVersion>true</enforceVersion> <source>REPOSITORY</source> <baseUrl></baseUrl> <outputDirectory>target/phantomjs</outputDirectory> </phantomjs>
@Parameter(property="keepServerAlive",
defaultValue="false")
protected boolean keepServerAlive
jasmine:test goal exists.
Useful if you need to run further analysis on your tests, like collecting code coverage.@Inject public TestMojo(org.eclipse.aether.RepositorySystem repositorySystem)
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
execute in interface org.apache.maven.plugin.Mojoexecute in class AbstractJasmineMojoorg.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionpublic void run()
throws Exception
run in class AbstractJasmineMojoExceptionCopyright © 2016. All rights reserved.