Interface ScenarioOrGroup

    • Method Detail

      • getDescription

        java.lang.String getDescription()
                                 throws java.rmi.RemoteException
        Returns:
        Returns the textual description of this ScenarioOrGroup (displayed int the Description view of TPT).
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setDescription

        void setDescription​(java.lang.String description)
                     throws java.rmi.RemoteException
        Set the testual description for this ScenarioOrGroup to be displayed in the Description view of TPT.
        Parameters:
        description - The new description.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getGroup

        ScenarioGroup getGroup()
                        throws java.rmi.RemoteException
        Get the parent scenario group or null if this object reside on the top level (meaning directly below the a Testlet).
        Returns:
        the parent group or null
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTestlet

        Testlet getTestlet()
                    throws java.rmi.RemoteException
        Returns:
        Returns the Testlet this ScenarioOrGroup belongs to. In case this object is a test case (see isTestcaseOrGroup()) the "main" testlet is returned.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • isTestcaseOrGroup

        boolean isTestcaseOrGroup()
                           throws java.rmi.RemoteException
        Returns true if this ScenarioOrGroup represents a test case or test case group. A Scenario is a test case, if it is within or a child of the Scenarios of the top level testlet. Otherwise, it is a variant in a one of the sub-testlets.
        Returns:
        • true if it is a test case or test case group
        • false if it is a variant or variant group
        Throws:
        java.rmi.RemoteException - remote communication problem
      • setInitialValue

        void setInitialValue​(java.lang.String declarationName,
                             java.lang.String value)
                      throws ApiException,
                             java.rmi.RemoteException
        Set a given initial value for a given declarationName for this ScenarioOrGroup. This corresponds to the initial values tab for test cases and variants. Child nodes inherit the setting from theire parent groups.
        Parameters:
        declarationName - The name of the Declaration.
        value - The new value for the Declaration or null to remove a value specific to this ScenarioOrGroup.
        Throws:
        ApiException -
        • if the name of the declaration does not exists or
        • the declaration is a read only parameter.
        java.rmi.RemoteException - remote communication problem
      • getInitialValue

        java.lang.String getInitialValue​(java.lang.String declarationName)
                                  throws ApiException,
                                         java.rmi.RemoteException
        Returns the initial value for a given declarationName as defined for this ScenarioOrGroup. Returns null if no value has been set for this ScenarioOrGroup.
        Parameters:
        declarationName - Name of the Declaration
        Returns:
        null or the currently set value.
        Throws:
        ApiException -
        • if the name of the parameter does not exists or
        • the declaration is a read only parameter.
        java.rmi.RemoteException - remote communication problem
      • setTestCaseAttributeValue

        void setTestCaseAttributeValue​(java.lang.String name,
                                       java.lang.String value)
                                throws ApiException,
                                       java.rmi.RemoteException
        Set the value for the TestCaseAttribute of a given name for this ScenarioOrGroup.

        TestCaseAttributes are only available for test cases. The type of the Scenario can be determined using isTestcaseOrGroup().

        Parameters:
        name - The name of the TestCaseAttribute
        value - The new value for the TestCaseAttribute with the given name
        Throws:
        ApiException - If name==null or if there exists no TestCaseAttribute with the given name or if the given value does not match the type of the attribute.
        java.rmi.RemoteException - remote communication problem
      • setStatus

        void setStatus​(java.lang.String author,
                       java.lang.String comment,
                       java.lang.String status)
                throws ApiException,
                       java.rmi.RemoteException
        Set the review status of the scenario or group.
        Parameters:
        author - The author of the status.
        comment - The comment of the status.
        status - The status type of the status.
        Throws:
        ApiException - If this is not a test case or test case group, author or comment is empty or null, or given status is invalid.
        java.rmi.RemoteException - remote communication problem
        See Also:
        Project.createStatusType(String)
      • getId

        @Deprecated
        int getId()
           throws java.rmi.RemoteException
        Deprecated.
        Will be removed in TPT-18. Since TPT-16 scenario IDs are strings. Use getIdString() instead.
        Returns:
        the scenario or scenario group ID.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If the ID of the assessment is not an integer
      • getIdString

        java.lang.String getIdString()
                              throws java.rmi.RemoteException
        Returns:
        the scenario or scenario group ID.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • move

        void move​(ScenarioGroup newParent,
                  int index)
           throws ApiException,
                  java.rmi.RemoteException
        Moves this ScenarioOrGroup to a new position in the scenario tree.
        Parameters:
        newParent - the new parent ScenarioGroup.
        index - the new position under the new parent.
        Throws:
        ApiException - If newParent==null or the new parent is for an other reason invalid.
        java.rmi.RemoteException - remote communication problem
      • copy

        ResultAndLogs<ScenarioOrGroup> copy​(ScenarioGroup targetGroup,
                                            int targetIndex)
                                     throws ApiException,
                                            java.rmi.RemoteException
        Copies this into the given targetGroup that can be from a different Project that is opened in the same TPT instance. If the targetGroup already contains an element with the same name a new one will be generated.
        Parameters:
        targetGroup - The group to copy this into. Can be from another Project.
        targetIndex - The index where the copy will be inserted. Use Integer.MAX_VALUE to append the copy at the end.
        Returns:
        The copy of this and all log messages that occured during copying.
        Throws:
        ApiException - If targetGroup is null or copying failed.
        java.rmi.RemoteException - remote communication problem