Class OpenReportForFailedTestAction
- java.lang.Object
-
- com.piketec.jenkins.plugins.tpt.publisher.OpenReportForFailedTestAction
-
- All Implemented Interfaces:
Action
,ModelObject
,org.kohsuke.stapler.StaplerProxy
public class OpenReportForFailedTestAction extends java.lang.Object implements Action, org.kohsuke.stapler.StaplerProxy
Action to open a TPT report of a failed test case- Author:
- FInfantino, PikeTec GmbH
-
-
Constructor Summary
Constructors Constructor Description OpenReportForFailedTestAction(Run<?,?> build, java.lang.String fileName, java.lang.String reportFile, java.lang.String id, java.lang.String exConfig, java.lang.String date, java.lang.String jenkinsConfigId)
This class is made for generating the failed html on the TPTReportPage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doDynamic(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)
This method is called when an object from this class is created.java.lang.String
getDisplayName()
java.lang.String
getExecutionConfiguration()
java.lang.String
getIconFileName()
java.lang.String
getName()
java.lang.Object
getTarget()
java.lang.String
getUrlName()
void
setExecutionConfiguration(java.lang.String executionConfiguration)
set the name of the TPT execution configuration
-
-
-
Constructor Detail
-
OpenReportForFailedTestAction
public OpenReportForFailedTestAction(Run<?,?> build, java.lang.String fileName, java.lang.String reportFile, java.lang.String id, java.lang.String exConfig, java.lang.String date, java.lang.String jenkinsConfigId)
This class is made for generating the failed html on the TPTReportPage. We open the index.html and we replace the string "overview.html" with the name of the failed test. We store that in a new html file called "failedTest.html". This will be done when it is requested by the user. This class is also similar to InvisibleActionHostingHtml.- Parameters:
build
- The current jenkins buildfileName
- The name of the tpt filereportFile
- the path to the report fileid
- the test case idexConfig
- the name of the execution configurationmdate
- the execution datejenkinsConfigId
- The unique ID of the configuration to create unique paths
-
-
Method Detail
-
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getIconFileName
public java.lang.String getIconFileName()
- Specified by:
getIconFileName
in interfaceAction
-
getUrlName
public java.lang.String getUrlName()
- Specified by:
getUrlName
in interfaceAction
-
getTarget
public java.lang.Object getTarget()
- Specified by:
getTarget
in interfaceorg.kohsuke.stapler.StaplerProxy
-
getName
public java.lang.String getName()
- Returns:
- The name of the TPT file
-
doDynamic
public void doDynamic(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws java.io.IOException, javax.servlet.ServletException
This method is called when an object from this class is created. When clicking on a failed test case, the overview report should be opened, with the navigation on the left and the failed test case report on the right. It maps the URL the user sees to the file path where the corresponding html document lies.- Parameters:
req
- The requestrsp
- The response- Throws:
java.io.IOException
- if the response could not be generatedjavax.servlet.ServletException
- if the response could not be generated
-
getExecutionConfiguration
public java.lang.String getExecutionConfiguration()
- Returns:
- the name of the TPT execution configuration
-
setExecutionConfiguration
public void setExecutionConfiguration(java.lang.String executionConfiguration)
set the name of the TPT execution configuration- Parameters:
executionConfiguration
- the name of the TPT execution configuration
-
-