Add ContentType when publishing artifacts
[functest-xtesting.git] / doc / xtesting / xtesting.md
1 # Xtesting
2
3 [Cédric Ollivier](mailto:cedric.ollivier@orange.com)
4
5 2018/03/23
6
7
8
9 ## Why Xtesting?
10
11
12 ### Functest framework
13
14 - handle all interactions with OPNFV CI/CD components (entry points,
15 results publication, status codes, etc.)
16 - ease the development of third-party testcases by offering multiple drivers:
17 Python, Bash, unittest, Robot Framework and VNF.
18
19 **It has worked very well for E-release, but updates were required for
20 the next ones**
21
22
23 ### Internal needs
24
25 - Functest has to verify Kubernetes deployment but
26 [its former framework](http://testresults.opnfv.org/functest/framework/) was
27 linked to OpenStack (e.g. credentials sourcing, rally verifiers, etc.)
28 - hosting both OpenStack and Kubernetes in the same Python package would
29 increase dependencies and then complexify
30 [container slicing](http://testresults.opnfv.org/functest/dockerslicing/)
31
32 **Why not refactoring the first Functest framework?**
33
34
35 ### External needs
36
37 - Functest Python and containers framework could be very useful out of OPNFV
38 (ease developing testcases, manage requirements and offer lightweight Docker
39 images)
40 - a new Functest design could simplify test integration in a complete
41 [OPNFV-based CI/CD toolchain](http://docs.opnfv.org/en/stable-euphrates/testing/ecosystem/overview.html)
42 (e.g. Testing Containers, Test API and dashboard)
43
44 **Let the developer only work on the test suites without diving into CI/CD
45 integration**
46
47
48
49 ## What's been done for Fraser?
50
51
52 ### Xtesting framework
53
54 - Functest framework were moved to a new xtesting repository
55 (functest only hosts OpenStack testcases)
56 - it has been updated and improved to follow all Xtesting technical
57 guidelines:
58   - unlink to **OpenStack** and **OPNFV**
59   - support both Python2 and Python3 (required by **Functional Gating**)
60   - be fully covered by unit tests and well rated by pylint (10/10)
61
62
63 ### Xtesting deliverables
64
65 - Xtesting is released as [a Python package](https://pypi.python.org/pypi/xtesting/)
66 and then is unlinked to OPNFV Milestones (Functest Python package now depends
67 on it)
68 - [opnfv/xtesting](https://hub.docker.com/r/opnfv/xtesting/) is proposed to
69 build third-parties containers (both amd64 and arm64 architectures).
70 - the API documentation is automatically built
71 [online](http://xtesting.readthedocs.io/en/latest/apidoc/xtesting.html)
72
73
74
75 ## Functest & Xtesting in Orange ONAP OpenLab
76
77
78 ### first verify the infrastructure via Functest
79
80 ```
81 +----------------------------+------------------+---------------------+------------------+----------------+
82 |         TEST CASE          |     PROJECT      |         TIER        |     DURATION     |     RESULT     |
83 +----------------------------+------------------+---------------------+------------------+----------------+
84 |      connection_check      |     functest     |     healthcheck     |      00:07       |      PASS      |
85 |         api_check          |     functest     |     healthcheck     |      07:46       |      PASS      |
86 |     snaps_health_check     |     functest     |     healthcheck     |      00:36       |      PASS      |
87 +----------------------------+------------------+---------------------+------------------+----------------+
88 ```
89 <!-- .element: style="font-size: 0.34em" -->
90
91
92 ```
93 +------------------------------+------------------+---------------+------------------+----------------+
94 |          TEST CASE           |     PROJECT      |      TIER     |     DURATION     |     RESULT     |
95 +------------------------------+------------------+---------------+------------------+----------------+
96 |          vping_ssh           |     functest     |     smoke     |      00:57       |      PASS      |
97 |        vping_userdata        |     functest     |     smoke     |      00:33       |      PASS      |
98 |     tempest_smoke_serial     |     functest     |     smoke     |      13:22       |      PASS      |
99 |         rally_sanity         |     functest     |     smoke     |      24:07       |      PASS      |
100 |       refstack_defcore       |     functest     |     smoke     |      05:21       |      PASS      |
101 |           patrole            |     functest     |     smoke     |      04:29       |      PASS      |
102 |         snaps_smoke          |     functest     |     smoke     |      46:54       |      PASS      |
103 |             odl              |     functest     |     smoke     |      00:00       |      SKIP      |
104 |         odl_netvirt          |     functest     |     smoke     |      00:00       |      SKIP      |
105 |        neutron_trunk         |     functest     |     smoke     |      00:00       |      SKIP      |
106 +------------------------------+------------------+---------------+------------------+----------------+
107 ```
108 <!-- .element: style="font-size: 0.34em" -->
109
110 ```
111 +----------------------+------------------+--------------+------------------+----------------+
112 |      TEST CASE       |     PROJECT      |     TIER     |     DURATION     |     RESULT     |
113 +----------------------+------------------+--------------+------------------+----------------+
114 |     cloudify_ims     |     functest     |     vnf      |      28:15       |      PASS      |
115 |     vyos_vrouter     |     functest     |     vnf      |      17:59       |      PASS      |
116 |       juju_epc       |     functest     |     vnf      |      46:44       |      PASS      |
117 +----------------------+------------------+--------------+------------------+----------------+
118 ```
119 <!-- .element: style="font-size: 0.34em" -->
120
121
122 ### then run ONAP HealthCheck
123
124 - All tests are run by a specialized Docker container(**<100 MB**) instead of
125 the classical ONAP testing virtual machine (**> 1GB**).
126 - the container mainly inherits from opnfv/xtesting and is completed by:
127   - Python dependencies
128   - all ONAP Robot Framework files retrieved from the original repositories
129   - testcases.yaml describing the testcases
130
131 [Orange-OpenSource/xtesting-onap-robot](https://github.com/Orange-OpenSource/xtesting-onap-robot/)
132
133
134 ![ONAP](ONAP.png)
135 <!-- .element: style="border: 0; width: 70%" -->
136
137
138
139 ## Conclusion
140
141
142 ## Benefits
143
144 - Xtesting allows a proper design inside OPNFV
145 - Xtesting and Functest help other LFN projects:
146   - verifying the infrastructure on top of which the components are deployed
147   - ease verifying the components as well in the same CI/CD toolchain
148
149   **All contributions coming from LFN projects are more than welcome!**