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