1, create a test project
Click File-> New Project, create a new Project
Following pop-up box shells, type selection: Directory
2, create a test set
Right-click on the "project name" -> select "new Suite" option
Following pop-up box shells, type selection: File
ps: test test case file set is stored, you can use the directory or file type storage type, if you select Directory, then create a directory-type test set (ie test directory), can continue to create a subset of tests under it, if select File, you can not create a subset in the test set.
3. Create test cases
Right-click on the "Test Suite1" choose New Test Case option, enter the case name and save it
4, into the test library
Click Library
Method One: Fill bomb box directly test library file name, must pay attention to the case (stepped hole)
Click OK, and successfully imported test libraries
Method Two: Test Library by adding "Browse" button (Python select the installation path, the position of the standard library, adding Collections.py, introduced Collections library).
General location: C: \ Python27 \ Lib \ site-packages \
Click "Browse" button
Test library file under: "\ Python27 \ Lib \ site-packages \ robot \ libraries C" path selection
Click OK, and successfully imported test libraries
5, create a resource file (resource)
Test Resource files provide shared user and key variable mechanism, close the test case file. Under normal circumstances create some keywords and user variables in the resource file, and then for the test case file references.
Directory type Project (or Test Suite) right mouse button to select "New Resource" option under
The current project, the user keywords and configuration variables on the uniform resource files are managed (users behind keywords and configuration variables description)
6, the package user key (user keyword)
Method One: Create a Keyword Test Suite right click -> click on new user keyword, and then enter the name, click OK to save
Method two: select content to be encapsulated in the test cases (Test case), then right click "Extract Keyword
In the edit user clicks keyword settings, input parameters Arguments: $ {xxx}, it's like a given input parameter of the function, the output is set Return value {xxx} $ . You can set multiple variables, between the "|" separated.
7, create a configuration variable (scalar variable)
8, in the test case keyword manipulation user (user keyword) and configuration variables (scalar variable)
(1) Once you've created can be used directly in a case of this keyword, provided that the test set to remember the introduction of the corresponding resource file (in edit test set, click Resource-> path- input source> click ok) .
(2) using the user key (user keyword) and configuration variables (scalar variable)