public class EnvironmentExtension
extends java.lang.Object
implements org.concordion.api.extension.ConcordionExtension, org.concordion.api.listener.SpecificationProcessingListener
Displays the environment details to the left hand side of the standard Concordion footer.
Sample usage:
@Extension private final EnvironmentExtension footer = new EnvironmentExtension() .withRerunTest(“MyMSD-RunSelectedTest”) .withRerunParameter(“token”, “ALLOW”) .withRerunParameter(“TEST_CLASSNAME”, this.getClass().getName().replace(ConcordionBase.class.getPackage().getName() + “.”, "“)) .withEnvironment(AppConfig.getEnvironment().toUpperCase()) .withURL(AppConfig.getUrl());
Note:
| Constructor and Description |
|---|
EnvironmentExtension() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTo(org.concordion.api.extension.ConcordionExtender concordionExtender) |
void |
afterProcessingSpecification(org.concordion.api.listener.SpecificationProcessingEvent event) |
void |
beforeProcessingSpecification(org.concordion.api.listener.SpecificationProcessingEvent event) |
static java.lang.String |
getSubversionUrl() |
EnvironmentExtension |
withEnvironment(java.lang.String environment)
Set the name of the environment to display in the footer of each specification.
|
EnvironmentExtension |
withRerunParameter(java.lang.String name,
java.lang.String value)
Set the name and value of a Jenkins rerun test job parameter to append to the “rerun” link.
|
EnvironmentExtension |
withRerunTest(java.lang.String jobName)
Set the name of the test to append a “rerun” link in the footer of each specification for.
|
EnvironmentExtension |
withURL(java.lang.String url)
Set the URL of the environment to display in the footer of each specification.
|
EnvironmentExtension |
withURL(java.lang.String url,
java.lang.String label)
Set the URL of the environment to display in the footer of each specification.
|
public void addTo(org.concordion.api.extension.ConcordionExtender concordionExtender)
addTo in interface org.concordion.api.extension.ConcordionExtensionpublic EnvironmentExtension withRerunTest(java.lang.String jobName)
Set the name of the test to append a “rerun” link in the footer of each specification for.
jobName - Name of the Jenkins job used to rerun a testpublic EnvironmentExtension withRerunParameter(java.lang.String name, java.lang.String value)
Set the name and value of a Jenkins rerun test job parameter to append to the “rerun” link. withRerunTest(String) must also be called.
name - Jenkins job parameter namevalue - If rerun Jenkins job accepts a subversion tag parameter then supply the namepublic EnvironmentExtension withEnvironment(java.lang.String environment)
Set the name of the environment to display in the footer of each specification.
environment - Envrionment namepublic EnvironmentExtension withURL(java.lang.String url)
Set the URL of the environment to display in the footer of each specification.
url - Environment URLpublic EnvironmentExtension withURL(java.lang.String url, java.lang.String label)
Set the URL of the environment to display in the footer of each specification.
url - Environment URLlabel - Label to show in place of the URLpublic void beforeProcessingSpecification(org.concordion.api.listener.SpecificationProcessingEvent event)
beforeProcessingSpecification in interface org.concordion.api.listener.SpecificationProcessingListenerpublic void afterProcessingSpecification(org.concordion.api.listener.SpecificationProcessingEvent event)
afterProcessingSpecification in interface org.concordion.api.listener.SpecificationProcessingListenerpublic static java.lang.String getSubversionUrl()