com.deepshiftlabs.nerrvana
Class NerrvanaExecution
java.lang.Object
com.deepshiftlabs.nerrvana.NerrvanaExecution
public class NerrvanaExecution
- extends Object
Parses and wraps information about tests execution in Nerrvana.
- Version:
- 1.00, 1.01 added
testExecutionResults(AbstractBuild, NerrvanaPluginSettings)
- Author:
- Deep Shift Labs, Victor Orlov
- See Also:
This class expects to get following response from Nerrvana API:
{@code
4547
520
1342533469
9234
winxp_sp3_firefox_110
https://xxx.ftps.nerrvana.com/demo_space/_test_runs/Testrun-Name/2022_01_22_22_22_22/winxp_sp3_firefox_110/
}
id
public String id
starttime
public String starttime
status
public String status
testrun_id
public String testrun_id
testrun_name
public String testrun_name
testrun_description
public String testrun_description
platforms
public ArrayList<Platform> platforms
NerrvanaExecution
public NerrvanaExecution()
getId
public String getId()
getTestrunName
public String getTestrunName()
getTestrunDescription
public String getTestrunDescription()
getStarttime
public String getStarttime()
getStatus
public String getStatus()
getPlatforms
public ArrayList<Platform> getPlatforms()
testExecutionResults
public static boolean testExecutionResults(hudson.model.AbstractBuild<?,?> build,
NerrvanaPluginSettings settings)
- Tests if execution of selenium tests in Nerrvana was successful.
Execution is successful if
-
All platforms completed execution with status = ok
(which means that Nerrvana processes successfuly completed, but doesn't mean
that tests execution was successful);
-
All messages dispatched from Nerrvana have the lower level then message
threshold defined in plugin settings (default level is: <message-threshold>ERROR</message-threshold>).
Also see
UserMessageLevel for message levels
- Parameters:
build - settings -
- Returns:
fatalResult
public static Document fatalResult(Document lastExecutionResult,
Exception e,
NerrvanaPluginSettings settings)
throws Exception
- Adds message about fatal error to the last <execution> node returned by Nerrvana
or creates placeholder containing <execution> node when no NerrvanaExecution object
has been returned by Nerrvana, e.g on connection failure.
- Parameters:
lastExecutionResult - last XML returned by Nerrvana servere - exception caused fatal errorsettings - settings object. Actually we need names of platforms for error report
- Returns:
- parsed XML document with <execution> node containing fatal error text
- Throws:
Exception
xml2list
public static ArrayList<NerrvanaExecution> xml2list(Document doc)
throws Exception
- Converts XML document into list of NerrvanaExecution objects
- Parameters:
doc - document containing <execution> nodes
- Returns:
- list of NerrvanaExecution objects
- Throws:
Exception
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2004-2013 Deep Shift Labs. All Rights Reserved.