Correct the ordering of the tenant parameter
[testsuite.git] / README.md
1 # Getting Started
2 ## Development Environment Setup
3 ### Python Installation
4 You should install 2.7.12: [https://www.python.org/downloads/release/python-2712](https://www.python.org/downloads/release/python-2712)
5
6
7 ### Pip Install
8 Install pip with the get-pip.py file from [https://bootstrap.pypa.io/get-pip.py](https://bootstrap.pypa.io/get-pip.py)
9 once downloaded run
10
11 ```
12 python get-pip.py
13 ```
14 let it install.
15
16 From the desktop, right click the Computer icon.
17 Choose Properties from the context menu.
18 Click the Advanced system settings link.
19 Click Environment Variables. In the section System Variables, click New.
20 In the New System Variable window, set the name as 'HTTPS\_PROXY' then specify the value of the HTTPS_PROXY environment variable as your proxy. 
21 Click OK. 
22 Close all remaining windows by clicking OK.
23
24
25 ### Robot Install
26 Reopen Command prompt window, and run below code to install robot.
27
28 ```
29 pip install robotframework
30 ```
31
32
33 ### IDE Install
34 Most further documents will use the RED environment for Robot.
35 [https://github.com/nokia/RED/releases/download/0.7.0/RED\_0.7.0.20160914115048-win32.win32.x86_64.zip](https://github.com/nokia/RED/releases/download/0.7.0/RED\_0.7.0.20160914115048-win32.win32.x86_64.zip)
36
37 Once you install that IDE you probably will want to have a python editor to edit python files better.
38 Go to Help > Eclipse Marketplace and search for PyDev and click install on PyDev for Eclipse 5.2.0
39
40 Once you install that IDE you will need EGit to check in git code.
41 Go to Help > Eclipse Marketplace and search for Egit git team provider and click install on EGit Git Team Provider 4.5.0
42
43 Once you install that IDE you will probably want a json editor to edit json better.
44 Go to Help > Eclipse Marketplace and search for Json Tools and click install on Json Tools 1.1.0
45
46 ### Project Setup
47 Note: You do not need to run these commands every time, only on a library update or initial checkout.
48
49 ```
50 ./setup.sh  
51 ```
52
53 Note that this script will download the chromedriver for the current OS. The default is linux64 which will download the appropriate chromedriver to /usr/local/bin so that it will be in the execution PATH.
54
55 Windows and Mac hosts will download into the current working directory. Windows and MAC users will need to ensure that the driver is 
56 in the execution PATH.
57
58
59 ## Robot Project Structure
60 ### Overview
61 ProjectName - robot
62
63 ```
64 `-- robot
65     |-- assets - put anything you need as input like json files, cert keys, heat templates
66     |   |-- templates - put any json templates in here, you can include subfolders for each component
67     |-- library - put any python libraries need to run tests in here
68     |   |-- OpenECOMP - put any python code libraries we write in here
69     |-- resources - put any robot resource files aka libraries we write in here
70     |   |-- aai
71     |   `-- vid
72     `-- testsuites - put any robot test suites we write in here
73 ```    
74
75 ### Tag Strucutre
76 Robot uses tags to seperate out test cases to run. below are the tags we use
77
78 * garbage - use this for test cases that should be cleaned up before go live date
79 * health - use this for test cases that perform a health check of the environment
80 * smoke - use this for test cases that perform a basic check of a component
81 * ete - use this for the test cases that are perofrming an end to end test
82
83 ## Branching Structure
84 ### Overview
85 Repository Name: testsuite
86
87 Branching strategy:
88 ```
89 `-- testsuite
90     |-- master - the main branch and always the latest deployable code. Send a pull to here from feature and Dan or Jerry will approve.
91     |-- feature-[XXXXXX] - when you want to make changes you make them here, when you are satisfied send pull request to master
92 ```    
93
94 ## Executing ETE Testcases
95 ### Overview
96 Two scripts have been provided in the root of the ete-testsuite project to enable test exectution
97
98 * runTags.sh - This shell uses Robot [Tags] to drive which tests are executed and is designed for automated testing.
99 * oneTest.sh - This shell is designed for unit testing of individual .robot files. It accepts a single argument identifying the .robot file in robot/testsuites to execute.
100   
101 #### runTags.sh
102 For further information on using Robot [Tags], see [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#configuring-execution] and [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#simple-patterns]
103
104 When executing tests via tags, all of the robot files in the project are scanned for tests cases with the specified tags.
105
106 There are 3 flavors of runTags.sh 
107 * runTags.sh with no arguments. This defaults to the default tag or runTags.sh -i health
108 * runTags.sh with a single include tag. In this case the -i or --include may be omitted. So runTags.sh ete is the same as runTags.sh -i ete
109 * runTags.sh with multiple tags. In this case, tags must be accompanied by a -i/--include or -e/--exclude to properly identify the disposition of the tagged testcase.
110
111 ```
112 runTags.sh -i health -i ete -e garbage
113 ```
114