This folder contains a ready-to-use project for testing the Network Core Engine implementation on a device. This Test Suite will typically create TCP sockets, UDP sockets, test client side and server side...
- Tested Foundation Library: NET
- Test Suite Module: com.microej.pack.net#net-1_1-testsuite
Update the NET Test Suite module version in the module.ivy to match the requirement of the tested VEE Port.
Please refer to VEE Port Qualification Test Suite Versioning to determine the Network Core Engine Test Suite module version.
- See VEE Port Test Suites documentation.
- In the SDK, import the
java-testsuite-runner-net
project in your workspace. - Follow the configuration and execution steps described in VEE Port Test Suites documentation.
The NET Test Suite requires specific properties depending on the implementation and test environment.
All the properties described in this section are defined in the file microej-testsuite-common.properties
and prefixed by microej.java.property.
.
Common properties:
testsuite.preferipv6
(optional, false by default): set to true if the tests must use IPv6 by default.- To use the service for the WiFi initialization add the following dependency in your
module.ivy
:<dependency org="com.microej.pack.net" name="net-1_1-testsuite-wifi" rev="2.1.0"/>
.- WiFi SSID and passphrase are set with respectively with the properties
wifi.ssid
andwifi.passphrase
.
- WiFi SSID and passphrase are set with respectively with the properties
Properties to define if testsuite.preferipv6
is false
:
wrong.machine.ipv4
: An invalid IPv4 address on the local networkremote.machine.ipv4
: IPv4 address of the testsuite servernetif.ipv4.name
: network interface name with an IPv4
Properties to define if testsuite.preferipv6
is true
:
wrong.machine.ipv6
: An invalid IPv6 address on the local networkremote.machine.ipv6
: IPv6 address of the testsuite servernetif.ipv6.name
: network interface name with an IPv6
When testing a device with a dual-stack IPv6+IPv4, the following properties must be set:
remote.machine.ipv4
: see abovenetif.ipv4.name
: see aboveremote.machine.ipv6
: see abovenetif.ipv6.name
: see above
This Test Suite runs network tests from the OpenJDK project. However some of these tests need the localhost network interface to run.
If you VEE Port or implementation does not provide this interface you can skip the OpenJDK tests.
To do so, add the pattern **/openjdk/**/*.class
to the property test.run.excludes.pattern
in your file config.properties
.
See VEE Port Test Suites documentation.
Source code of Test Suite server application is available online:
- Download the desired Test Suite Module: For example com.microej.pack.net#net-1_1-testsuite (refer to VEE Port Qualification Test Suite Versioning to determine the Test Suite module version).
- Unzip the Test Suite
RIP
(it is a zip file): For examplenet-1_1-testsuite-[version].rip
. - Open the Java archive
JAR
(it is a zip file): For example/content/resources/net-tests/net-1_1-testsuite-remote.jar/
. - Open the desired test: For example
/com/microej/net/test/integration/remoteapp/TestServerSocketAccept.java
.
See VEE Port Test Suites documentation.
The Test Suite runs a server application for which logs are only accessible via a TCP socket. In order to display the logs, the following steps are required:
- Specify the log server address with the property
remoteapp.logging.host
(by defaultlocalhost
) inconfig.properties
file. - Specify the log server port with the property
remoteapp.logging.port
(set it to0
to disable the remote log feature ; this is the default value) inconfig.properties
file. - Start a log server. You can use netcat:
nc -l <port>
(where<port>
is the port specified in the previous property).