1 Run Integration Test Locally
2 ============================
6 Sometimes you might want to run some CSIT integration tests on your VM
7 instead of the sandbox, this guide contains information about pre-requisites
8 that need to be installed.
12 To run the integration tests you will need a Linux-type OS, like Ubuntu or
13 CentOS. Setup can be done manually, or you can download a VM image with the
16 Set up the integration test framework
17 -------------------------------------
22 For Debian-based distributions
26 sudo apt-get install python3
27 sudo apt-get install python3-pip
29 Install Robot Framework and Extended Requests Library
30 _____________________________________________________
33 RobotFramework installation guide can be found `here <https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html>`_
35 Releng/Builder CI/CD installation options can be checked inside the `integration-install-robotframework.sh <https://github.com/opendaylight/releng-builder/blob/master/jjb/integration/integration-install-robotframework.sh>`_
39 pip3 install robotframework
40 pip3 install robotframework-extendedrequestslibrary
42 Install Libraries needed for test suites
43 ________________________________________
47 pip3 install alabaster Babel docutils imagesize Jinja2 lfdocs-conf
51 Add new user with name `jenkins` to the linux, setup home directory for this
52 user. Create and add pair of ssh keys. Put them to /home/jenkins/.ssh
55 This is only applicable if you don't change a ${DEFAULT_USER} variable.
61 ssh jenkins@localhost -i /home/jenkins/.ssh/id-rsa
64 If *Robot* can not connect through SSH, but manually connection works ok - update paramiko library:
68 pip3 install --upgrade robotframework-sshlibrary
69 pip3 install --upgrade paramiko
71 Run single integration test
72 ---------------------------
74 Start `Karaf` and install required features.
80 robot -L debug --variable KARAF_HOME:/home/user/workspace/netconf/karaf/target/assembly/bin --variable USER_HOME:/home/jenkins --variable DEFAULT_LINUX_PROMPT:\$ --variable ODL_SYSTEM_IP:127.0.0.1 --variable ODL_SYSTEM_1_IP:127.0.0.1 --variable RESTCONFPORT:8181 --variable IS_KARAF_APPL:True ./test.robot
83 * *KARAF_HOME* - path to karaf directory
84 * *USER_HOME* - path to jenkins home directotry. Used by `Robot` to read id-rsa key for ssh connection. Can be set to any directory where .ssh folder with id-rsa key located
85 * *ODL_SYSTEM_IP* - IP of ODL restconf server.
86 * *ODL_SYSTEM_1_IP* (*ODL_SYSTEM_2_IP*, *ODL_SYSTEM_3_IP*) - IP`s of ODL cluster.
87 * *RESTCONFPORT* - Restconf server port. 8181 by default.
89 Current list of parameters used by jenkins job can be found at `integration-run-test.sh <https://github.com/opendaylight/releng-builder/blob/174e01d61a9472b0b25da8d05d7c56bfb5589809/jjb/integration/integration-run-test.sh#L40>`_ script.
91 Full list of variables available from the CSIT is configured under the `Variables.robot <https://github.com/opendaylight/integration-test/blob/master/csit/variables/Variables.robot>`_
94 Every suite can have different options. Please check Jenkins configuration for the specific test.
99 On test finish, test result will be in the same folder as `Robot` test file: