com.deepshiftlabs.nerrvana
Class Platform

java.lang.Object
  extended by com.deepshiftlabs.nerrvana.Platform

public class Platform
extends Object

Parses and wraps information about platform where tests are executed in Nerrvana.

Version:
1.00
Author:
Deep Shift Labs, Victor Orlov
See Also:
HttpCommunicator#getExecutionStatus(NerrvanaExecution)

, NerrvanaExecution


Field Summary
 String browse_url
           
 String code
           
 String id
           
 List<UserMessage> messages
           
 String name
           
 SortedMap<UserMessageLevel,List<UserMessage>> sortedMessages
           
 String status
           
 
Constructor Summary
Platform()
           
Platform(String id, String code, String name, String status, String browse_url)
           
 
Method Summary
 String getBrowsetitle()
           
 String getBrowseurl()
          Returns URL to Nerrvana where user (provided credentials) may review this platform execution artifacts
 String getBrowseurlMarkup()
          Returns content for the onclick javascript handler
 String getCode()
           
 String getId()
           
 int getMessageCount()
           
 List<UserMessage> getMessages()
           
 String getMessagesLabel()
          Returns message type names with message count by type Example: "ERROR(4), WARN(2), TRACE(1)"
 String getName()
           
static ArrayList<Platform> getPlatformList(Node parent)
          Returns Platform list which reside under the given XML node
 SortedMap<UserMessageLevel,List<UserMessage>> getSortedMessages()
           
 String getStatus()
          Returns status label for this platform.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public String id

code

public String code

name

public String name

status

public String status

browse_url

public String browse_url

sortedMessages

public SortedMap<UserMessageLevel,List<UserMessage>> sortedMessages

messages

public List<UserMessage> messages
Constructor Detail

Platform

public Platform()

Platform

public Platform(String id,
                String code,
                String name,
                String status,
                String browse_url)
Method Detail

getId

public String getId()

getCode

public String getCode()

getName

public String getName()

getStatus

public String getStatus()
Returns status label for this platform. There are three possible results:
  1. NERRVANA FAILURE - Nerrvana process failed to execute Selenium tests (don't mess with tests failure)
  2. TESTS FAILURE - Nerrvana process successfully completed, but Selenium tests sent messages of type ERROR or FATAL
  3. SUCCESS - Nerrvana process successfully completed and tests didn't send ERROR or FATAL messages

Returns:
text representation of the execution status for this platform instance

getBrowseurl

public String getBrowseurl()
Returns URL to Nerrvana where user (provided credentials) may review this platform execution artifacts

Returns:
URL to Nerrvana or label "Not available"

getBrowseurlMarkup

public String getBrowseurlMarkup()
Returns content for the onclick javascript handler

Returns:
javascript code snippet

getBrowsetitle

public String getBrowsetitle()

getSortedMessages

public SortedMap<UserMessageLevel,List<UserMessage>> getSortedMessages()

getMessages

public List<UserMessage> getMessages()

getMessageCount

public int getMessageCount()

getMessagesLabel

public String getMessagesLabel()
Returns message type names with message count by type Example: "ERROR(4), WARN(2), TRACE(1)"

Returns:
merged message type names

getPlatformList

public static ArrayList<Platform> getPlatformList(Node parent)
                                           throws Exception
Returns Platform list which reside under the given XML node

Parameters:
parent - parent node in XML document
Returns:
list of Platform objects
Throws:
Exception

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2013 Deep Shift Labs. All Rights Reserved.