Class ALMTestTool

  • All Implemented Interfaces:
    java.io.Serializable

    public class ALMTestTool
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • ALMTestTool

        public ALMTestTool()
    • Method Detail

      • startRecorder

        public static void startRecorder​(Grant g,
                                         java.lang.String caseId)
      • stopRecorder

        public static void stopRecorder​(Grant g)
      • createTestCase

        public static java.lang.String createTestCase​(Grant g,
                                                      java.lang.String appId,
                                                      java.lang.String name,
                                                      java.lang.String desc,
                                                      java.lang.String userId)
                                               throws java.lang.Exception
        Create a test case
        Parameters:
        g - User rights
        appId - ALM application ID
        name - Test name
        desc - Test description
        userId - User row ID
        Returns:
        test ID
        Throws:
        java.lang.Exception
      • deleteTestCase

        public static void deleteTestCase​(Grant g,
                                          java.lang.String testId)
        Delete a test case
        Parameters:
        g - User rights
        testId - Test ID
      • registerStep

        public static ALMTestTool.Step registerStep​(Grant g,
                                                    ALMTestTool.TestCase tc,
                                                    Parameters p)
        Record a step to a test case
        Parameters:
        g - User rights
        tc - Current Test case
        p - Request parameters
        Returns:
        New step or null if step is ignored
      • updateScreen

        public static void updateScreen​(Grant g,
                                        java.lang.String testId,
                                        java.lang.String stepNum,
                                        byte[] screen)
        Update a step with the screenshot
      • addEvent

        public static ALMTestTool.Event addEvent​(Grant g,
                                                 java.lang.String type,
                                                 java.lang.String target,
                                                 java.lang.String form,
                                                 java.lang.String value,
                                                 boolean top,
                                                 java.lang.String x,
                                                 java.lang.String y)
        Add event to last step
        Parameters:
        g - Current user
        type - 'click' or 'field' value
        target - element id or input field name
        form - Optional form name
        value - Optional field value
        x - Optional event X coordinate
        y - Optional event Y coordinate
        Returns:
        New event or null if no step found
      • changeProfile

        public static void changeProfile​(Grant g,
                                         java.lang.String login)
        Switch user profile
        Parameters:
        g - Current user
        login - Run as login
      • restoreProfile

        public static void restoreProfile​(Grant g)
        Restore user profile
        Parameters:
        g - Current user
      • stopRun

        public static void stopRun​(ObjectDB testCase,
                                   java.lang.String status)
        Stop simulation