Class LocalTriggerManager.ScriptTestResultBean

    • Constructor Detail

      • ScriptTestResultBean

        public ScriptTestResultBean​(mks.ci.server.engine.TestResult testResult,
                                    int userId,
                                    java.sql.Connection c)
    • Method Detail

      • getExposedName

        public java.lang.String getExposedName()
        Description copied from class: ScriptBaseBean
        Returns the name of this bean that is exposed to the scripting language.
        Specified by:
        getExposedName in interface mks.frame.triggers.ScriptExposableBean
        Specified by:
        getExposedName in class ScriptBaseBean
        Returns:
        the bean name: siMemberBean.
      • getSessionID

        public int getSessionID()
        Returns the Windchill RV&S item id of the item that acts as the test session of this test result.
        Returns:
        the Session ID of this test result.
      • getSessionBean

        public LocalTriggerManager.ScriptIssueBean getSessionBean()
                                                           throws mks.frame.triggers.TriggerException
        Returns a LocalTriggerManager.ScriptIssueBean representing the Windchill RV&S item that acts as the test session of this test result.
        Returns:
        A bean representing Windchill RV&S item.
        Throws:
        mks.frame.triggers.TriggerException - if the item could not be retrieved.
      • getCaseID

        public int getCaseID()
        Returns the Windchill RV&S item id of the item that acts as the test case of this test result.
        Returns:
        the Case ID of this test result.
      • getCaseBean

        public LocalTriggerManager.ScriptIssueBean getCaseBean()
                                                        throws mks.frame.triggers.TriggerException
        Returns a LocalTriggerManager.ScriptIssueBean representing the Windchill RV&S item that acts as the test case of this test result.
        Returns:
        A bean representing Windchill RV&S item.
        Throws:
        mks.frame.triggers.TriggerException - if the item could not be retrieved.
      • getSharesCaseID

        public int getSharesCaseID()
        Returns the Windchill RV&S item id of the item that acts as the shares test case of this test result.
        Returns:
        the Shares Case ID of this test result.
      • getSharesCaseBean

        public LocalTriggerManager.ScriptIssueBean getSharesCaseBean()
                                                              throws mks.frame.triggers.TriggerException
        Returns a LocalTriggerManager.ScriptIssueBean representing the Windchill RV&S item that acts as the shares test case of this test result.
        Returns:
        A bean representing Windchill RV&S item,
        Throws:
        mks.frame.triggers.TriggerException - if the item could not be retrieved.
      • hasVerdict

        public boolean hasVerdict()
        Returns true if the verdict is set for this test step result.
        Returns:
        true if this test result has a verdict, false otherwise.
      • getVerdict

        public java.lang.String getVerdict()
        Returns the name of the verdict set for this test result, or null if no verdict has been set.
        Returns:
        A string representing the verdict, or null if no verdict has been set.
      • getVerdictType

        public java.lang.String getVerdictType()
        Returns the name of the verdict type set for this test result (e.g. "Pass", "Fail", "Other") or null if no verdict has been set.
        Returns:
        A string representing the verdict type, or null if no verdict has been set.
      • getAnnotation

        public java.lang.String getAnnotation()
        Gets the annotation of this test result.
        Returns:
        The annotation of this test result.
      • hasStepResults

        public boolean hasStepResults()
        Returns true if this test result has test step results.
        Returns:
        true if this test result has test step results, false otherwise.
      • hasRelatedItems

        public boolean hasRelatedItems()
        Returns true if this test result has related items
        Returns:
        true if this test result has related items, false otherwise.
      • isRelatedItem

        public boolean isRelatedItem​(int relatedItem)
        Return true if the given item is related to this test result.
        Parameters:
        relatedItem - the Windchill RV&S item ID to test for a relationship.
        Returns:
        true if the given item is related to this test result, false otherwise.
      • getRelatedItems

        public int[] getRelatedItems()
        Returns all items that are related to this test result as an array of Windchill RV&S item ids.
        Returns:
        An array of Windchill RV&S item ids.
      • getRelatedItemBeans

        public LocalTriggerManager.ScriptIssueBean[] getRelatedItemBeans()
                                                                  throws mks.frame.triggers.TriggerException
        Returns all items that are related to this test result as an array of ScriptIssueBeans.
        Returns:
        An array of beans representing Windchill RV&S items related to this test result.
        Throws:
        mks.frame.triggers.TriggerException
      • hasAttachments

        public boolean hasAttachments()
        Returns true if this test result has attachments.
        Returns:
        true if this test result has attachments, false otherwise.
      • getAttachments

        public java.lang.String[] getAttachments()
        Return all attachments of this test result as an array of Strings representing the attachment name.
        Returns:
        An array of strings representing test result attachments.
      • getAttachmentBeans

        public LocalTriggerManager.ScriptAttachmentBean[] getAttachmentBeans()
        Returns all attachments of this test result as an array of ScriptAttachmentBeans.
        Returns:
        An array of beans representing test result attachments.
      • getFieldDisplayString

        public java.lang.String getFieldDisplayString​(java.lang.String fieldName)
                                               throws mks.frame.triggers.TriggerException
        Retrieve the value of a result field as a printable string.
        Parameters:
        fieldName - the name of the result field whose value we return. Only fields exposed in the test result by a test result type can be used here.
        Returns:
        a string representing the display value of the result field
        Throws:
        mks.frame.triggers.TriggerException
      • getFieldValue

        public java.lang.Object getFieldValue​(java.lang.String fieldName)
                                       throws mks.frame.triggers.TriggerException
        Retrieve the value of the field by name. The actual value returned is always a java object:
        • Integer: Java `Integer' object
        • Double: Java `Double' object
        • PickList: String name of the picked entry
        • Date: Java `Date' object
        • Text: String
        Note that in javascript, you can mostly use all these values without converting, javascript will for example extract the int value out of the Integer if you try to use it for arithmetic.
        Parameters:
        fieldName - the name of the result field whose value we return. Only fields exposed in the test result by a test result type can be used here.
        Returns:
        Various, if the field has not been set, the null value.
        Throws:
        mks.frame.triggers.TriggerException - if the field is not known or an error occurs retrieving the value.