Interface Testlet

    • Method Detail

      • hasDefinedContent

        boolean hasDefinedContent()
                           throws java.rmi.RemoteException
        Returns:
        Returns true, if this testlet has defined content. This means it is either a testlet or a reference. Returns false if no content has been set or if the content has been deleted (for example by the context menu in the TPT GUI).
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createNewContent

        void createNewContent()
                       throws java.rmi.RemoteException
        Creates a new local definition for this state that has not been referenced so far. Additionally, a StepListScenario is created for this state. Any previously existing definition for this state will be replaced by the new one. Any existing Scenarios will be deleted.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createSLVariant

        StepListScenario createSLVariant​(java.lang.String name,
                                         ScenarioGroup groupOrNull)
                                  throws ApiException,
                                         java.rmi.RemoteException
        Creates a new step list variant (StepListScenario) or a new test case (if the current Testlet is the top level Testlet). If the parameter groupOrNull==null, the newly created step list variant is placed directly below the testlet (getTopLevelScenarioOrGroup()). If a specific ScenarioGroup is given, the newly created variant is placed there.
        Parameters:
        name - The name of the newly created variant. Null will be reduced to an empty string.
        groupOrNull - Either the group where the newly created StepListScenario should be added or null to add it in the top level group of this Testlet.
        Returns:
        the newly created StepListScenario.
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If the content of the Testlet is empty.
      • createDiagVariant

        DiagramScenario createDiagVariant​(java.lang.String name,
                                          ScenarioGroup groupOrNull)
                                   throws ApiException,
                                          java.rmi.RemoteException
        Creates a new diagram variant (DiagramScenario) or a new test case (if the current Testlet is the top-level Testlet). If the parameter groupOrNull==null, the newly created StepList variant is placed directly below the Testlet (getTopLevelScenarioOrGroup()). If a specific ScenarioGroup is given, the newly created variant is placed there.
        Parameters:
        name - The name of the new variant. Null will be reduced to an empty string.
        groupOrNull - Either the group where the newly created DiagramScenario should be added or null to add it in the top-level group of this Testlet.
        Returns:
        the newly created DiagramScenario
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If the content of the Testlet is empty
      • createVariantGroup

        ScenarioGroup createVariantGroup​(java.lang.String name,
                                         ScenarioGroup groupOrNull)
                                  throws ApiException,
                                         java.rmi.RemoteException
        Create a new ScenarioOrGroup and add it to the given ScenarioGroup directly below this Testlet, if groupOrNull==null.
        Parameters:
        name - The name of the newly created group. Null will be reduced to an empty string.
        groupOrNull - The group, in which the newly created ScenarioGroup should be added or null if it shall be added to the top level group of the Testlet.
        Returns:
        the newly created ScenarioGroup
        Throws:
        java.rmi.RemoteException - remote communication problem
        ApiException - If the content of the Testlet is empty
      • getTopLevelScenarioOrGroup

        RemoteList<ScenarioOrGroup> getTopLevelScenarioOrGroup()
                                                        throws java.rmi.RemoteException
        Returns the CONTENTS of the top level ScenarioGroup of this Testlet as list of ScenarioOrGroup.
        Returns:
        The list of ScenarioOrGroup that are contained in the top level group.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTransitions

        RemoteCollection<Transition> getTransitions()
                                             throws java.rmi.RemoteException
        Returns:
        Returns a RemoteCollection that contains all Transitions in this hierarchy layer of the diagram.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getLines

        RemoteCollection<Line> getLines()
                                 throws java.rmi.RemoteException
        Returns:
        Returns a RemoteCollection that contains all Lines in this hierarchy layer of the diagram.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getTextAreas

        RemoteCollection<TextArea> getTextAreas()
                                         throws java.rmi.RemoteException
        Returns:
        Returns a RemoteCollection that contains all text areas in this hierarchy layer of the diagram.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getStates

        RemoteCollection<Testlet> getStates()
                                     throws java.rmi.RemoteException
        Returns:
        Returns a RemoteCollection that contains all Testlets in this hierarchy layer of the diagram.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getJunctions

        RemoteCollection<Junction> getJunctions()
                                         throws java.rmi.RemoteException
        Returns:
        Returns a RemoteCollection that contains all Junctions in this hierarchy layer of the diagram.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • getFinals

        RemoteCollection<Final> getFinals()
                                   throws java.rmi.RemoteException
        Returns:
        Returns a RemoteCollection that contains all final junctions (Final) in this hierarchy layer of the diagram.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createLine

        Line createLine​(int y)
                 throws java.rmi.RemoteException
        Create a new horizontal Line with the height (vertical position) y
        Parameters:
        y - The vertical position for the newly created Line
        Returns:
        the newly created Line
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createTextArea

        TextArea createTextArea​(java.lang.String text,
                                java.awt.Point pos)
                         throws java.rmi.RemoteException
        Create a new TextArea at the position pos with the content text.
        Parameters:
        text - The text that should be displayed in the TextArea. Null will be reduced to an empty string.
        pos - The position in the diagram given as Point.
        Returns:
        The newly created TextArea
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createTestlet

        Testlet createTestlet​(java.lang.String name,
                              java.awt.Point pos)
                       throws java.rmi.RemoteException
        Create a new diagram state (Testlet) at the given position
        Parameters:
        name - The name of the newly created state Testlet. Null will be reduced to an empty string.
        pos - The position of the Testlet in the diagram given as Point
        Returns:
        the newly created Testlet
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createTestlet

        Testlet createTestlet​(java.lang.String name)
                       throws java.rmi.RemoteException
        Create a new state (Testlet) which is not visible in the diagram and is intended for the use in the step list.
        Parameters:
        name - The name of the newly created state Testlet. Null will be reduced to an empty string.
        Returns:
        the newly created Testlet
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createJunction

        Junction createJunction​(java.awt.Point pos)
                         throws java.rmi.RemoteException
        Create a new Junction at the given position pos
        Parameters:
        pos - The position in the diagram given as Point.
        Returns:
        The newly created Junction
        Throws:
        java.rmi.RemoteException - remote communication problem
      • createFinal

        Final createFinal​(java.awt.Point pos)
                   throws java.rmi.RemoteException
        Creat a new Final junction at the given position pos
        Parameters:
        pos - The Position in the Diagram given as Point.
        Returns:
        The newly created Final
        Throws:
        java.rmi.RemoteException - remote communication problem
      • copy

        ResultAndLogs<Testlet> copy​(Testlet target)
                             throws java.rmi.RemoteException,
                                    ApiException
        Copies this into the given target that can be from a different Project that is opened in the same TPT instance. If the target already contains an element with the same name a new one will be generated.
        Parameters:
        target - The testlet to copy this into. Can be from another Project.
        Returns:
        The copy of this and all log messages that occured during copying.
        Throws:
        ApiException - If target is null or copying failed.
        java.rmi.RemoteException - remote communication problem