버전 비교

  • 이 줄이 추가되었습니다.
  • 이 줄이 삭제되었습니다.
  • 서식이 변경되었습니다.

This document provides how to This document step-by-step instructions on how to create and manage test scripts in test cases.. The test scripts of a test case are the Unit Tests that are to be performed when executing a test plan of auto type. 

정보

To manage test plans, you need a permission such as Project Manager, Create Plan/TC … . For more information, please refer to Global Permissions.

 

목차

 

Create Test Script

참고사항

Test Script can be created if the test case type is Auto.

To create test scripts:

...

In TESTaide home, select the project that you want to remove test scripts from.

...

minLevel1
maxLevel7

Creating new Test Scripts

Creating test scripts after having created a manual test case:

  1. After having created a manual test case you will be redirected to the test case page, on the pop-up window that appears, enter the required and any optional information.

    1. Refer to the table below for more information on the test script fields.

  2. Click the ‘Save’ button at the bottom of the window to complete the test script creation.

Creating new test scripts to already existing manual test cases:

  1. On the TESTaide homepage, select the project which you wish to create additional test scripts for.

  2. On the left-hand side navigation bar, click on the ‘Test Case’ options.

  3. From the list of test cases, select the test case you wish to create additional test scripts for. This will redirect you to the test case page.

  4. On the test case page, click on the

...

  1. ‘Create Test Script’ button. On the pop-up window that appears, enter the

...

Test Case : Test Case Name(Test Case Key). (Fixed)

...

  1. required and any optional information.

    1. Refer to the table below for more information on the test script fields.

  2. Click the ‘Save’ button at the bottom of the window to complete the test script creation.

Field

Description

Test Case

This displays the name and key of the current test case that is selected. This value is fixed and cannot be modified.

Title

(Optional) The maximum length for the title is 50 characters.

Test Script

...

Test Data : Required data for testing(variable)

...

Expected Result

...

Here you will input the unit test that you want to be performed.

Test Data

(Optional) Here you will input any required data that is used in the unit testing. E.g., any reoccurring variables used in the testing operation.

Expected Result

(Optional) Here you will input the expected result from the unit test, e.g., assertions of any operations occurred in the testing.

정보

The script must be written according to the Python syntax, and method names for each test case are not written.

...

Writing the following in the test data

...

field will make the variable usable within the test script.

...

  • 코드 블럭
    languagepy
    user_id='testaide'

In the case of writing multiple script in one test case, the variable self.driver must be declared at the top of EACH test script. Refer to the example below for more information on the format of the test script.

Test Script Example

Example Test Script

The following example contains two test scripts,

  • The first script accesses the login page, enters the required information, and checks that the result was successful by asserting that the URL of the incoming page contains the keyword ‘project’.

  • The second script tries to find and enter the project containing the key ‘AUTO1’ and again checks that the result was successful by asserting that the URL of the incoming page contains the keyword ‘project’.

No

Test Script

Test Data

Expected Result

1

self.driver.get(loginurl)

my_driver = self.driver

userIdEle = my_driver.find_element(By.NAME, 'logId')

passwordEle = my_driver.find_element(By.NAME, 'logPw')

submitEle = my_driver.find_element(By.CLASS_NAME, "btn-style")

userIdEle.send_keys(user_id)

passwordEle.send_keys(user_pw)

submitEle.click()

time.sleep(2)

loginurl = 'http://localhost:8080/loginForm.do'

user_id='testaide'

user_pw='welcome'

self.assertIn("project.", my_driver.current_url)

2

my_driver = self.driver

project_url = my_driver.current_url + "?key={}".format(projectkey)

my_driver.get(project_url)

time.sleep(3)

projectkey = 'AUTO1'

self.assertIn('project', my_driver.current_url)

...

Editing an existing Test Script

...

Modifying information of a test script:

...

  1. On the TESTaide

...

  1. homepage, select

...

  1. the project

...

  1. which you

...

  1. wish to

...

  1. create additional test

...

  1. script for.

...

Select the 'Test Cases' menu on the left sidebar.

...

  1. On the left-hand side navigation bar, click on the ‘Test Case’ options.

  2. From the list of test cases, select the test case you wish to create additional test script for. This will redirect you to the detailed test case page.

  3. In the test script panel below, click the ‘Edit’ icon besides the test

...

  1. script you want to edit from the test script list.

...

  1. In the ‘Test Script’ pop-up window, edit the information you want.

    1. Refer to the table above for more information on the test script fields.

  2. Click the ‘Save’ button at the bottom to save the changes.

Changing the order of the test scripts

📌 To change the order among test scriptsscript, simply click either the ‘Up’ or ‘Down’ icon besides the test script.

...

Deleting an existing Test Script from the Test Case.

To remove any test script(s) from a test case, follow these scripts:

...

  1. On the TESTaide

...

  1. homepage, select

...

  1. the project

...

  1. which you

...

  1. wish to

...

  1. create additional test

...

  1. script for.

...

Select the 'Test Cases' menu on the left sidebar.

...

  1. On the left-hand side navigation bar, click on the ‘Test Case’ options.

  2. From the list of test cases, select the test case you wish to create additional test script for. This will redirect you to the detailed test case page.

  3. In the test script panel below, click the ‘Remove’ icon besides the test

...

  1. script you want to delete from the test

...

  1. script list.

  2. When the deletion confirmation pop-up window appears, click the 'OK' button to complete the deletion.