com.deepshiftlabs.nerrvana
Class NerrvanaExecution

java.lang.Object
  extended by 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/
                  
              
          
      
 
 }
 

Field Summary
 String id
           
 ArrayList<Platform> platforms
           
 String starttime
           
 String status
           
 String testrun_description
           
 String testrun_id
           
 String testrun_name
           
 
Constructor Summary
NerrvanaExecution()
           
 
Method Summary
static Document fatalResult(Document lastExecutionResult, Exception e, NerrvanaPluginSettings settings)
          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.
 String getId()
           
 ArrayList<Platform> getPlatforms()
           
 String getStarttime()
           
 String getStatus()
           
 String getTestrunDescription()
           
 String getTestrunName()
           
static boolean testExecutionResults(hudson.model.AbstractBuild<?,?> build, NerrvanaPluginSettings settings)
          Tests if execution of selenium tests in Nerrvana was successful.
 String toString()
           
static ArrayList<NerrvanaExecution> xml2list(Document doc)
          Converts XML document into list of NerrvanaExecution objects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

NerrvanaExecution

public NerrvanaExecution()
Method Detail

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
  1. All platforms completed execution with status = ok (which means that Nerrvana processes successfuly completed, but doesn't mean that tests execution was successful);
  2. 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
  3. 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 server
e - exception caused fatal error
settings - 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-2012 Deep Shift Labs. All Rights Reserved.