Newer
Older
This repositories contains the test specifications and test adapter code for MEC API Conformance Testing in TTCN-3, GS 032-2/3.
More information and download of the standard at https://portal.etsi.org/webapp/WorkProgram/Report_WorkItem.asp?WKI_ID=56776.
For more information on ETSI ISG Multi-access Edge Computing (MEC), visit https://www.etsi.org/technologies/multi-access-edge-computing.
Unless specified otherwise, the content of this repository and the files contained are released under the BSD-3-Clause license.
See the attached LICENSE file or visit https://forge.etsi.org/legal-matters.
- Multi-access Edge Computating standards, accessible [here](https://www.etsi.org/standards#page=1&search=MEC&title=1&etsiNumber=1&content=1&version=0&onApproval=1&published=1&withdrawn=0&historical=0&isCurrent=1&superseded=1&startDate=1988-01-15&endDate=2029-12-06&harmonized=0&keyword=&TB=&stdType=&frequency=&mandate=&collection=&sort=1).
## RFC links
- RFC 7159 - The JavaScript Object Notation (JSON) Data Interchange Format, accessible [here](https://tools.ietf.org/html/rfc7159.html)
NOTE All draft can be found in the 'IETF XML Registry', accessible [here](https://www.iana.org/assignments/xml-registry/xml-registry.xhtml)
## STFs/TTFs
The following STFs were or are currently involved in the evolutions of the ETSI MEC protocols project:
- STF 569, STF 625, TTF T012
# Installation
The ETSI MEC protocols project builds and tests regularly on the following platforms:
- Linux (Ubuntu)
- Windows ([Cygwin x64](https://cygwin.com/install.html), [Npcap SDK x64](https://nmap.org/npcap/#download) and [OpenSSL-Windows x64](https://www.openssl.org) are required)
Note: The [OpenSSL](https://www.openssl.org) version >= 1.1.1 is also required.
## Installation
The MEC Testing Framework project builds and tests regularly on the following platforms:
- Linux (Ubuntu)
Note: The [OpenSSL](https://www.openssl.org) version > 1.1.x is also required.
### How to do it?
They are two different methods:
- Using [Vagrant](https://www.vagrantup.com/)
- Using [Docker](https://www.docker.com/)
How to choose one of these methods is depending of your host system.
NOTE: In all case, if you want to setup an continuous integration process (e.g. Jenkins), Docker is the best choice.
#### The host system is Windows
The both methods require a virtual machine. You can use either VirtualBox or WMware.
In this case, the easiest way is to use Vagrant.
#### The host system is Linux
Vagrant requires a virtual machine. You can use either VirtualBox or WMware.
Docker does not need a virtual machine, so it is the more efficant way.
### Using TITAN compiler on a Docker image
In this configuration, TITAN compiler is located on a Docker image and the sources and the outputs are located on the host.
- Install Docker
Procedure on the host machine:
- Open a Terminal
- Clone the ETSI MEC Test System
```sh
$ git clone --recurse-submodules --branch devel https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git
```
- Apply patches
```sh
- From the ETSI MEC Test System root directory, build the Docker image executing the following commands:
$ cd ./virtualization/docker
$ docker build --no-cache --tag alpine-mec -f Dockerfile --force-rm .
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine-mec latest dafa00e36515 23 seconds ago 623MB
alpine latest 49176f190c7e 13 days ago 7.05MB
```
To check that TITAN is well installed, execute the following command:
```sh
$ ./docker-run.sh version
To build the MEC Test Suite, execute the following command:
Possble other options are 'clean' to remove all the build outputs or 'rebuild' to force a build of the Test Suite after a 'clean'.
To retrieve the list of the available test cases, execute the following command:
Before to execute the MEC Test Suite, prepare, edit and update the configuration file:
$ ln -sf ../../etc/AtsXxx/AtsXxx_yyy.cf_ ../../etc/AtsXxx/AtsXxx.cfg # e.g. ln -sf ../../etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ ../../etc/AtsMec_Location/AtsMec_Location.cfg
$ vi ../../etc/AtsXxx/AtsXxx.cfg # To update it, e.g. vi ../../etc/AtsMec_Location/AtsMec_Location.cfg
To execute the MEC Test Suite, execute the following command:
```sh
```
<b>Notes</b>:
- The MEC Test System is listening on port 30181
- Updating the file etc/AtsXxx/AtsXxx.cfg is about (e.g. etc/AtsMec_Location/AtsMec_Location.cfg):
. Selecting the test(s) to be executed
. Updating value of PICs and PIXITs
. Updating HTTP port setting
### Using development Docker image
In this configuration, the TITAN compiler, the sources and the outputs are located on the Docker image.
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
Pre-requisites on your host machine:
- Install Virtualbox
- Install Docker
Procedure for a Windows host machine:
- On your host machine, open a the Docker Quickstart Terminal
- On your host machine, clone the ETSI MEC Testing Framework project. NOTE that only Docker folder and .jenkins.sh script file are required
- From the ETSI MEC Testing Framework project root directory, execute the following commands:
```sh
$ ./.jenkins.sh
...
```
NOTE The creation and the installations will take some time to achieve
- Start the container
```sh
$ ./docker/run-container.sh
...
```
- Switch to the next clause (Usage)
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
### Using Vagrant
Pre-requisites on your host machine:
- Install [Virtualbox](https://www.virtualbox.org/manual/ch01.html)
- Install [Vagrant](https://www.vagrantup.com/intro/getting-started/)
- Install Vagrant plugin vagrant-vbguest
- Credentials to access [ETSI forge](https://forge.etsi.org/gitlab/users/sign_in)
- Set the environment variable USERNAME to your ETSI EOL account user name
- Set the environment variable PASSWORD to your ETSI EOL account password
Procedure:
- On your host machine, open a command line session (PuTTY, DOS window...)
- From the ETSI MEC Testing Framework project, clone the Vagrant folder
- In the file Vagrantfile, modify the tag config.vm.provision replacing <username> & <password> strings by your ETSI credentials
- In the Vagrant folder, execute the following commands:
```sh
$ vagrant up --provider virtualbox --provision
...
```
NOTE The creation and the installations will take some time to achieve
- Stop vagrant virtual machine
```sh
$ vagrant halt
...
```
- Update the file 'Vagrantfile' to match with your networks configuration
- Re-start the vagrant virtual machine and log to to the machine
```sh
$ vagrant up
...
$ vagrant ssh
```
- Switch to the next clause (Usage)
NOTE The user password is vagrant.
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
### From scratch
Pre-requisites:
- Install Virtualbox
Procedure:
- Install a new Linux Virtual machine (Mint, Debian...)
- Update your system with the latest version of kernel and security packages
- Install the following packages (According to the Linux chosen, the package naming can be different)
autoconf
bison
build-essential
cmake
curl
dos2unix
doxygen
emacs
expect
flex
g++:latest
gcc:latest
graphviz
gdb
git-core
gnutls-bin
libglib2.0-dev
libpcap-dev
libgcrypt-dev
libncurses5-dev
libssl-dev
libtool-bin
libtool
libwireshark-dev
libxml2-dev
lsof
ntp
pkg-config
qt5-default
qtmultimedia5-dev
libqt5svg5-dev
subversion
sudo
sshpass
tcpdump
texlive-font-utils
tshark
valgrind
vim
vsftpd
xutils-dev
tree
tzdata
unzip
wget
xsltproc
- In your home directory, create the following folders:
- $HOME/frameworks,
- $HOME/dev
- $HOME/lib
- In $HOME/frameworks, build the following package:
- asn1c, according the procedure specified [here](https://github.com/vlm/asn1c.git)
- Eclipse IDE for C/C++ Developers, according the procedure specified [here](https://www.eclipse.org/cdt/)
- TITAN, according the procedure specified [here](https://github.com/eclipse/titan.core)
- Import the TITAN plugin into your Eclipse IDE, according the procedure specified [here](https://github.com/eclipse/titan.core)
- Clone the ETSI MEC Testing Framework project into $HOME/dev folder
```sh
$ git clone --recurse-submodules --branch devel https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git ./gs032p3-ttcn-test-suite
- Update your default environment with the content of the script $HOME/dev/gs032p3-ttcn-test-suite/scripts/devenv.bash.ubuntu
# Generate certificates for TLS and MEC security support
This clause describes how generate certificates desrived from Let's encrypt certificate. These certificate will be used for TS mutual authentication and for MEC Security tests.
<b>NOTE:</b>
- Certficates shall be renewed every 3 months
- The port 80 shall be vailable for standalone validation
Pre-requisites:
- You need to install python and [certbot](https://manpages.ubuntu.com/manpages/impish/en/man1/certbot.1.html).
To generate certifcates, execute the following command:
```sh
$ export REQUESTS_CA_BUNDLE=$(dirname `python -c "import certifi; print(certifi.where())"`)
$ mkdir -p $HOME/var/ssl
$ sudo certbot certonly --debug --mec-tls-cert --config-dir $HOME/var/ssl --work-dir $HOME/var/ssl --logs-dir $HOME/var/ssl --standalone --agree-tos --email <your email> -d <your domain> -w $HOME/var/ssl/
```
<b>NOTE:</b> For testing certificate generation and renewal, use the certbot's --dry-run option.
This clause describes how to compile and execute an Abstract Test Suite.
Pre-requisites:
- Your machine is installed following one of the installation method describes in the previous clause
- Your are logged as 'etsi' or 'vagrant' user
Procedure using Eclipse TITAN:
- Start eclipse using a new workspace, (e.g. with the name workspace_titan)
- Download and follow the steps to install Eclipse plugins for TITAN, accessible [here]{https://www.eclipse.org/downloads/download.php?file=/titan/Eclipse_installationguide.pdf}
- Open the workspace_titan
- Create a new TITAN project (e.g. gs032p3-ttcn-test-suite)
<TODO>
Procedure in TITAN command line:
- Open several SSH session (PuTTY...)
- Change to the directory ~/dev/gs032p3-ttcn-test-suite/src/AtsMec/objs
...
```
- Edit the file ../etc/AtsMec.cfg
- PICS_HEADER_HOST, the HTTP host header value
- system.httpPort.params
- To run the test suite, execute the following command:
```sh
...
```
- The log files are located in ../logs folder. You can edit them using any editor or using the Eclipse TITAN log plugins
The ETSI MEC Testing Framework project is under constant development, so it is possible that you will
encounter a bug while using it. Please report bugs at cti_support at etsi dot org.