Build and run your first automated test

Follow these step-by-step instructions to creating and run your first automated test. This test creates a new user record.

Before you begin

  • Role required: admin
  • The Automated Test Framework plugin must be activated. It is activated by default on zboot or upgrade.
  • If necessary, enable test execution.
    Note: The test execution property is disabled to prevent running tests on a production system. Run tests only on development, test, and other sub-production instances.

Create new test

Procedure

  1. Navigate to Automated Test Framework > Tests.
  2. Click New.
    The system displays the Test new record form.
  3. On the Test new record form, enter a name for your test in the Name field. The system will identify this test by this name whenever it displays a list of tests, for example, under the Tests module.

    Screenshot of form for creating a new test
  4. In the Description field, enter a description for your test.
  5. Click Save.

Result

The system creates a new test record and returns to the list of tests. For more information about creating new automated tests, see Create new automated test.

Add the first step to the new test

About this task

Procedure

  1. If necessary, navigate to Automated Test Framework > Tests.
  2. Click the row containing the test you want to contain the new test steps.
    The system displays the Test form.
  3. On the Test Steps related list, click Add Test Step.
    The system displays the Add Test Step form.
  4. In the middle column, click the row for the step type Open a new form, then click Next.

    Screenshot of Add Test Step dialog
    The system displays the Add Test Step form for the Open a new form step.
  5. From the Table field, select the User [sys_user] table. Then click Update.

    Screenshot of Add Test Step: Open a New Form.
    The system creates the new step and returns to the test record.
  6. Click Submit.

Result

The system creates a new test record and returns to the list of tests. For more information about adding steps to automated tests, see Add steps to automated test.

What to do next

For some ideas on how to continue learning about the Automated Test Framework, see Next steps with the Automated Test Framework.

Add the second step to your automated test

Procedure

  1. Click the row containing the test you want to contain the new test steps.
    The system displays the Test form.
  2. On the Test Steps related list, click Add Test Step.
    The system displays the Add Test Step form.
  3. In the middle column, click Set Field Values, then click Next.
    The system displays the Add Test Step form for the Set values step.
  4. In the field values section, set Last name to Test and First name to Otto (or other names of your choice). Then click Update.


Result

The system creates the new step and returns to the test record. For more information about adding steps to automated tests, see Add steps to automated test.

Add the third step to your test

Procedure

  1. Click the row containing the test you want to contain the new test steps.
    The system displays the Test form.
  2. On the Test Steps related list, click Add Test Step.
    The system displays the Add Test Step form.
  3. In the middle column, click Submit form, then click Next.
    The system displays the Add Test Step form for the Submit a form step.
  4. Leave all values as set by default and click Submit.


    The system creates the new step and returns to the test record. The test record should now show the three steps you just added.

  5. Click Submit.

Result

The system returns to the list of tests. For more information about adding steps to automated tests, see Add steps to automated test.

Run your test

Procedure

  1. If necessary to view the Tests list, Click Tests.
  2. Click the row containing the test you just created.
    The system displays the Test form.
  3. Click Run Test.
    Because this test includes a form step (any step involving a UI), the system displays a dialog box asking you to choose among any currently-running test clients or start a new test runner. To continue, select start a new test runner and click OK.

Result

The system displays the Run Test progress dialog. For more information about running automated tests, see Run automated test.

Monitor test progress and view test results

  1. Monitor the progress of the test in the Run Test progress dialog. If needed, you can cancel a test even while it's running.
  2. Note: If your test creates data, the system rolls back that data after all steps in the test complete.
    When complete, click Go to Results on the Run Test progress dialog to display the Test Results list, where you can view and analyze the results.