User Tools

Site Tools


iotivity_api_test_guide

General Information

General information section introduces the IoTivity platform and its testing. Organization of the manual is also shown in this section

Introduction

IoTivity is an open source software framework enabling seamless device-to-device connectivity to address the emerging needs of the Internet of Things. IotivityTest contains the test cases (and related files) for testing the APIs of this IoTivity framework. Currently, there are test cases for Linux, Tizen, Android and Arduino platform.

Organization of the Manual

The user manual consists of five sections: General Information, Configuration, Folder Structure, Build and Run. In this document, each $ sign indicates a terminal command.

  • General Information section explains the purpose of IotivityTest
  • Configuration section describes installation process of required soft wares for IoTivity Testing
  • Folder structure section describes how test files are stored in test folder
  • Build section provides the build process of test cases for different platforms
  • Run section provides extra information needed for running TCs

Configuration

This includes setting up development environment for various platforms and cloning IoTivity source from Gerrit.

Linux Platform:

Firstly, open a terminal and follow below process.

  1. Login as root
    $ sudo su [follow this process in every terminal you open]
  2. Install gcc/g++
    $ add-apt-repository ppa:ubuntu-toolchain-r/test (If it's not working, see  
    http://askubuntu.com/questions/193513/problem-adding-a-ppa-to-install-gcc-4-7 )
    1. If “add-apt-repository” command have a problem, follow next steps
    2. Write below commands in the terminal-
      $ apt-get install gcc-4.6 g++-4.6
      $ apt-get install gcc-4.7 g++-4.7
      $ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 
      $ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
      $ update-alternatives --config gcc
    3. Select gcc 4.7 in the terminal
  3. Install Build-essential
    $ apt-get install build-essential
  4. Install Cmake
    $ apt-get install cmake
  5. Install Boost 1.5.8
    1. Download boost library ver 1.5.8 from the boost official site (zip file)
      1. Boost Homepage : http://www.boost.org/
      2. Find different versions link on http://www.boost.org/users/history/
    2. Extract boost zip file into “You_Created_Boost_Lib_Folder”, In terminal, go to the extracted folder and run below commands-
      $ apt-get build-dep libboost-all-dev
      $ apt-get install g++-arm-linux-gnueabi
      $ apt-get install gcc-arm-linux-gnueabi
      $ apt-get install aptitude
      • Commands for boost install-
        $ ./bootstrap.sh
        $ ./b2 install
      • If above two commands, doesn’t work, follow below commands-
        $ apt-get install build-essential g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev libboost-all-dev
        $ ./bootstrap.sh --prefix=/usr/local
        $ ./b2 install
  6. Install Bluetooth
    $ apt-get install libbluetooth-dev
  7. Install Automake
    $ apt-get install automake
  8. Install Libtool
    $ apt-get install libtool
  9. Install Gettext
    $ apt-get install gettext
  10. Install expat
    $ apt-get install libexpat1-dev
  11. Install Libssl-dev
    $ apt-get install libssl-dev
  12. Install libcurl4-openssl-dev
    $ apt-get  install libcurl4-openssl-dev
  13. Install Java
    $ apt-get install python-software-properties
    $ add-apt-repository ppa:webupd8team/java
    $ apt-get update
    $ apt-get install oracle-java8-installer
  14. Install Eclipse
    1. Download Eclipse from http://www.eclipse.org/downloads/
  15. Install Scons
    $ apt-get install scons
  16. Install UUID Library
    $ apt-get install uuid-dev 
  17. Install Git
    $ apt-get install git-core
  18. Install ssh
    $ apt-get install ssh
  19. Install Libglib
    $ apt-get install libglib2.0-dev

Android Platform [Information is given based on Ubuntu 32Bit pc]

  1. Prerequisites for Android:
    1. Setup Java Development Kit (JDK)
    2. Setup Android SDK
      1. Download android sdk for linux from the following link: http://developer.android.com/sdk/index.html#Other
      2. Extract the downloaded file, extracted folder is your SDK location
    3. Setup Android Studio
      1. Download Android Studio IDE from the following link: http://developer.android.com/sdk/index.html
    4. Setup Android Development Tools(ADT) Plugin
  2. Install Gradle:
    1. Open terminal and run following commands -
      $ add-apt-repository ppa:cwchien/gradle
      $ apt-get update
      $ apt-get install gradle (need minimum version- 2.2)
  3. Set Android SDK Paths:
    1. Open terminal and use following command-
      $ gedit   ~/.bashrc [It will open bashrc file in editor]
    2. In the file -
      1. Set Android SDK location to ANDROID_HOME
      2. Add the path - $ANDROID_HOME/tools
      3. Add the path - $ANDROID_HOME/platform-tools
      4. Save the file
    3. Sample Android Path Setup:
      export ANDROID_HOME=/home/<user_name>/android-sdks 
      export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
  4. Android NDK:
    1. Download android NDK for Linux(32/64) from one of the following links:
    2. Run the downloaded bin file in a terminal
    3. Open a terminal and type ./<BinFileName>-
      1. Example:
        $ ./android-ndk-r10e-linux-x86.bin
    4. It will extract the bin file, extracted folder is your NDK location
    5. Add the NDK location as an environment variable in the bashrc file
      1. Open file using command:
        $ gedit   ~/.bashrc
        export ANDROID_NDK=<YourNdkLocation>
  5. Maven [Needed for Only IoTivity RC module]
    $ apt-get install maven

Tizen Development Environment

  1. Install Gbs & Mic:
    1. Open terminal and go to root mode, after that, enter command -
      $ gedit /etc/apt/sources.list [This command will open “sources.list” in text editor]
    2. Add Tizen tools repository to the source list. (according to Linux version)
    3. Save this file:
      $ apt-get update
      $ apt-get install gbs mic
  2. Tizen SDK:
    1. Download Tizen SDK image and SDK Installer for Linux(32/64) from the following link: https://developer.tizen.org/development/tools/download
    2. Open the install manager and install using the image file
    3. Find the sdb executable location. Normally it is- “<tizen-sdk>/tools/”
    4. Add this location as an environment variable in the bashrc dile-
      export PATH=$Path:/<YourSdbLocation>

Arduino Development Environment

  1. Arduino SDK:
    1. Download Arduino 1.5.8 for Linux(32/64) from the following link: https://www.arduino.cc/en/Main/OldSoftwareReleases#previous
    2. Extract the downloaded file, extracted folder is your Arduino location
    3. Add the arduino location as an environment variable in the bashrc file
      export ARDUINO_HOME=<YourArduinoLocation>

Cloning Iotivity Source

  1. Create ssh keys [skip this step, if you want to use existing ssh keys]
    1. On the terminal, type the following (replace “your name <your_email_address>” with your name and email address)
      $ ssh-keygen -t rsa -C "your name"
    2. After pressing the Enter key at several [LS6] prompts, an ssh key-pair will be created at ~/.ssh/id_rsa.pub.
      $ ssh-keygen -t rsa -C "John Doe john.doe@example.com"
  2. Upload and register an ssh public key
    1. Log in to IoTivity Gerrit
    2. Click on Settings on the top right side as shown here
    3. Click on SSH Public Keys and add key
    4. Open ~/.ssh/id_rsa.pub, copy the content, and paste the content in the “Add SSH Public Key” window
    5. Click Add
  3. Setting up ssh
    1. Open ~/.ssh/config in a text editor
    2. Add the following line
      • Host iotivity gerrit.iotivity.org
      • Hostname gerrit.iotivity.org
      • IdentityFile ~/.ssh/id_rsa
      • User [Insert_your_username_here]
      • Port 29418
    3. To connect behind the proxy, add the following line after IdentityFile ~/.ssh/id_rsa with the appropriate proxy address and port
      1. ProxyCommand nc -X5 -x <proxy-address>:<port> %h %p
  4. Verify your ssh connection
    1. Execute the following command in the terminal window
      $ ssh gerrit.iotivity.org
    2. Upon successful connection, the following message should appear indicating proper ssh and configuration connection:
      ******Welcome to Gerrit Code Review****** 
    3. If the connection is not established, check for the proxy and use the proxy settings described in Step c of 3
  5. Cloning the project source
    1. Using your terminal window, browse to the directory where code will be checked out.
    2. Execute the following command in the terminal window to clone the IoTivity repository:
      $ git clone iotivity:iotivity or git clone ssh://gerrit.iotivity.org/iotivity
      • This command clones the repository in your current working directory.

Folder Structure

This includes the folder structure for test cases of IoTivity. Below is a diagram Folder Structure

Build

IoTivity Source Download and Build(Precondition)

You have to Download and Build the IoTivity Source Code before the first build of your test cases.

IoTivity Download

  1. Download IoTivity Source by cloning from gerrit or from below link:

IoTivity Build

  1. Linux Source Build
    • To build IoTivity for Linux, go to IoTivity folder and run below command in a terminal
      $ scons TARGET_OS=linux
      • Specifically some module has some special commands. Different Commands for some modules are discussed below:
    • CA(Connectivity Abstraction) Linux
      • Build for CA unspecified Network , IP (WiFi + Ethernet) and TCP (WiFi + Ethernet):
        • Open Terminal inside IoTivity folder and run below command:
          $ scons TARGET_OS=linux SECURED=1 TARGET_TRANSPORT=ALL WITH_TCP=1
    • RD(Resource Directory) Linux
      • Open Terminal inside IoTivity folder and run below command:
        $ scons RD_MODE=CLIENT,SERVER
    • PM(Provisioning Manager) Linux
      • Open Terminal inside IoTivity folder and run below command:
        $ scons SECURED=1 WITH_TCP=1 MULTIPLE_OWNER=1 WITH_MQ=PUB,SUB WITH_CLOUD=1
    • CS(Cloud Security) Linux
      • Open Terminal inside IoTivity folder and run below command:
        $ scons SECURED=1 WITH_TCP=1 MULTIPLE_OWNER=1 WITH_MQ=PUB,SUB WITH_CLOUD=1
    • CI(Cloud Interface)
      • Open Terminal inside IoTivity folder and run below command:
        scons TARGET_OS=linux WITH_CLOUD=1 WITH_MQ=PUB,SUB,BROKER RD_CLIENT=1 TARGET_TRANSPORT=IP WITH_TCP=1
  2. Tizen Source Build
    • First, you need to copy the .gbs.conf file from “<iotivity>/tools/tizen” to Your Home Directory
    • Run $ ./gbsbuild.sh from iotivity folder
    • GBS-ROOT-OIC folder will be created inside Ubuntu home folder
    • After build, Confirm some .rpm files are available at “<GBS-ROOT-OIC >/local/repos/tizen/armv7l/RPMS” directory.
    • Copy scons-2.1.0-3.1.slp.noarch.rpm to the “<GBS-ROOT-OIC>/local/repos/tizen/armv7l/RPMS” folder from: “<iotivity>/tools/tizen”
    • Now confirm that regarding .so files are available at this directory-“<iotivity>/out/tizen/armv7l/release”
    • If .so files are not located at above directory
      • Find rpm files at the GBS-ROOT-OIC folder in your home directory
      • Extract iotivity-<version>.armv7l.rpm and iotivity-service-<version>.armv7l.rpm and enter extracted folders
      • Copy all .so files to “<iotivity>/out/tizen/armv7l/release” directory (need to create yourself if it is not available)
    • CA module has different build procedure for building tizen source, Discussed below:
    • Connectivity Abstraction(CA) Tizen
      • Go to iotivity folder and run commands in terminal
        • Building for all transports :
          scons -f resource/csdk/stack/samples/tizen/build/SConscript TARGET_TRANSPORT=ALL WITH_TCP=1 SECURED=1 TARGET_OS=tizen RELEASE=0 LOGGING=TRUE
        • Building for a specific transport:
          $ scons -f resource/csdk/stack/samples/tizen/build/SConscript TARGET_TRANSPORT=IP WITH_TCP=1 SECURED=1 TARGET_OS=tizen RELEASE=0 LOGGING=TRUE
        • Building for multiple transports:
          $ scons -f resource/csdk/stack/samples/tizen/build/SConscript TARGET_TRANSPORT=IP,BT,BLE WITH_TCP=1 SECURED=1 TARGET_OS=tizen RELEASE=0 LOGGING=TRUE 
  3. Android Source Build
    • Go to iotivity folder
    • Open a terminal
    • Run below Command
      $ scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP ANDROID_HOME=<your_android_sdk_path> ANDROID_NDK=<your_android_ndk_path>
    • Some modules have different build procedures for building android source, discussed below:
    • Connectivity Abstraction(CA) Android
      • Open terminal inside iotivity folder and run below command:
        • For IP and TCP transport TC:
          $ scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP WITH_TCP=1 RELEASE=1 SECURED=1 ANDROID_HOME=<your_android_sdk_path> ANDROID_NDK=<your_android_ndk_path>
        • For BT and BLE transport TC:
          $ scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=BT,BLE RELEASE=1 SECURED=0 ANDROID_HOME=<your_android_sdk_path> ANDROID_NDK=<your_android_ndk_path>
    • Provisioning Manager(PM) Android
      • Open terminal inside iotivity folder and run below command:
        $ scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=ALL RELEASE=1 SECURED=1 WITH_TCP=1 ANDROID_HOME=<android_sdk_path> ANDROID_NDK=< android_ndk_path>
    • EasySetup(PHY) Android
      • Open terminal inside iotivity folder and run below command:
        $ scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP ES_ROLE=mediator ES_TARGET_ENROLLEE=<Platform> RELEASE=0 ANDROID_HOME=$ANDROID_HOME ANDROID_NDK=$ANDROID_NDK
      • Here, <Platform> can be : arduino , linux, tizen
  4. Arduino Source Build
    • Currently two modules have APIs for Arduino. Those module’s build process is described below:
    • CA (Connectivity Abstraction) Arduino:
      • Open terminal inside iotivity folder and run below command:
        $ sudo scons resource/csdk/connectivity/ TARGET_OS=arduino TARGET_TRANSPORT=IP  SHIELD=ETH TARGET_ARCH=avr BOARD=mega ARDUINO_HOME=$ARDUINO_HOME
        • Here, SHIELD may three types: (i) SHIELD=ETH (ii) SHIELD=WIFI (iii) SHIELD=BLE
  5. Windows Source Build
    • To build IoTivity for Windows, go to IoTivity folder and run below command
      $ scons TARGET_OS=windows WITH_UPSTREAM_LIBCOAP=1
      • Specifically some module has some special commands. Different Commands for some modules are discussed below:
    • CA(Connectivity Abstraction) Windows
      • Build for CA unspecified Network , IP (WiFi + Ethernet) and TCP (WiFi + Ethernet):
        • Open Command Prompt inside IoTivity folder and run below command:
          $ scons TARGET_OS=windows SECURED=1 TARGET_TRANSPORT=ALL WITH_TCP=1
    • PM(Provisioning Manager) Windows
      • Open Command Prompt inside IoTivity folder and run below command:
        $ scons SECURED=1 WITH_TCP=1 MULTIPLE_OWNER=1 WITH_MQ=PUB,SUB
  6. Java Source Build
    • To build IoTivity for Linux, go to IoTivity folder and run below command in a terminal
      $ scons BUILD_JAVA=1 JAVA_HOME=<path_to_JAVA_HOME> ANDROID_GRADLE=<GRADLE_HOME>/bin/gradle

TC and Inter-op App Build

Linux TC and Inter-Op App Build

  • To build the Test cases go to “<iotivity>/test” directory and run the scons Command
  • Currently used Switches for Linux are:
    • TARGET_OS: Target platform (linux|android|arduino|tizen|all)
      • default: linux
    • MODULE: Target Service (ca|re|sm|es|pm|cs|rc|rd|ri|ns|ic|all)
      • Enter module name you want to build
      • default: all
    • SDK: Target SDK of selected module(csdk|cpp|all)
      • Enter module name which you want to build
      • default: all
    • TEST: Target Test(all|tc|app)
      • default: tc
    • TARGET_ARCH: Target architecture (x86|x86_64|arm|arm64)
      • default: x86
    • TARGET_TRANSPORT: Target Transport(BT|BLE|IP|all)
      • defaults: all
    • RELEASE: release/debug
      • allowed values: RELEASE=0(debug)/RELEASE=1(release)
      • default: release
    • SECURED: 0 / 1
      • allowed values: SECURED=0(non-secured)/SECURED=1(secured)
      • default: 1
  • Example:
    $ scons TARGET_OS=linux MODULE=ri SDK=cpp TEST=tc SECURED=0
  • TC binaries will be located at “<iotivity>/test/bin/linux”
    • Known Issues should be solved by installing the following packages
      $ sudo apt-get install uuid-dev
      $ sudo apt-get install libboost-thread-dev
      $ sudo apt-get install libboost-filesystem-dev
    • CA and CS(Only from 1.2.1) have different build procedure for building Linux test cases, discussed below:
  • Connectivity Abstraction(CA) Linux TC:
    • Network Independent
      • Run following command for “CATest_btc & CACommonTest_stc” suites
        $ scons TARGET_OS=linux MODULE=ca
      • It will generate binary “iotivity_ca_simulator & iotivity_ca_test”
    • IP (Wifi + Ethernet)
      • Run following command for TCs that requires IP as transport
        $ scons TARGET_OS=linux MODULE=ca TARGET_TRANSPORT=IP
      • It will generate binary “iotivity_ca_ip_test”
    • TCP (Wifi + Ethernet)
      • Run following command for TCs that requires IP as transport
        $ scons TARGET_OS=linux MODULE=ca TARGET_TRANSPORT=TCP
      • It will generate binary “iotivity_ca_tcp_test”
  • Cloud Security (CS) Linux TC:
    • TLS MODE OFF
      • Run following command for Cloud Security
        $ scons TARGET_OS=linux MODULE=cs TLS_MODE=0
    • TLS MODE ON
      • Run following command for Cloud Security
        $ scons TARGET_OS=linux MODULE=cs TLS_MODE=1
      • TLS_MODE = 1 or 0 represent TLS Mode enabled and disabled respectively.
      • The generated binary will have name format iotivity_cs_<csdk/cpp>_tls<on/off>_test

Tizen TC Build

  • Precondition [Adding RPM path in configuration file]:
    • Go to below path:
      • “<iotivity>/test/build”
    • Open configuration.scons file
    • Replace RPMS_DIR variable with the following directory
      • “<GBS-ROOT-OIC>/local/repos/tizen/armv7l/RPMS”
  • Source Build:
    • To build the Test cases go to “<iotivity>/test” directory and run the scons Command
    • Currently used Switches for Tizen are:
      • TARGET_OS: Target platform (linux|android|arduino|tizen|all)
        • default: linux
      • MODULE: Target Service (ca|sm|re)
        • Enter module name which you want to build
      • TEST: Target Service(all|tc|app)
        • default: tc
      • TARGET_ARCH: Target Architecture (armv7l)
        • Use TARGET_ARCH = armv7l for building tizen tc
      • Example:
        $ scons TARGET_OS=tizen MODULE=ca TARGET_ARCH=armv7l TIZEN_HOME=<path_to_tizen_sdk> TEST=all PUSH=all 
  • If TC build is done perfectly, tc rpm will be generated in one of these two locations:
    “<iotivity>/test/bin/tizen” OR “<GBS-ROOT-OIC>/local/repos/tizen/armv7l/RPMS”
  • TC Binary Name Example: org.tizen.TM_UTC_ITC-0.0.1-1.armv7l.rpm
  • You can push these binaries to Tizen devices using command:
    $ sdb push <BinaryName>

Android TC and Inter-op App Build

  • Connect android device and Go to “<iotivity>/test/build/” folder
  • Follow one of these procedures
    • Run the following command for module wise build:
      scons TARGET_OS=android MODULE=(ca|ri|pm|csic|re|rc|es|sm|ns) TARGET_ARCH=armeabi
    • Example:
      scons TARGET_OS=android MODULE=ca TARGET_ARCH=armeabi
  • APK will be loaded into device if build is successful
  • CA has different build procedure for building android tc, discussed below:
  • Connectivity Abstraction(CA) Android TC:
    • IP(Wifi) & TCP(Wifi)
      • Prerequisite: “gtest-1.7.0” & “bosst-1.58.0” libraries must be in “<iotivity>/extlibs” as following:
        •  <iotivity>/extlibs/gtest/gtest-1.7.0
        •  <iotivity>/extlibs/boost/boost_1_58_0
      • Go to “<iotivity>/test” folder and run following command:
        $ scons MODULE=ca TARGET_OS=android SECURED=1 ANDROID_HOME=<android_sdk_root_path> ANDROID_NDK=<android_ndk_root_path> ANDROID_GRADLE=<gradle_root_path>/bin/gradle FRAMEWORK=gtest TEST=all
    • BLE + EDR
      • Go to “<iotivity>/test” folder and run following command:
        $ scons MODULE=ca TARGET_OS=android SECURED=1 ANDROID_HOME=<android_sdk_root_path> ANDROID_NDK=<android_ndk_root_path> ANDROID_GRADLE=<gradle_root_path>/bin/gradle FRAMEWORK=junit TEST=all

Java TC Build

  • Go to “<iotivity>/test/” folder
  • Follow one of these procedures
    • Run the following command for module wise build:
      scons BUILD_JAVA=1 MODULE=(ri|ic|re|es|ns) SDK=java ANDROID_GRADLE=<path_to_gradle>/bin/gradle SECURED=0
    • Run the following command for module wise build:
      scons BUILD_JAVA=1 MODULE=(pm|cs) SDK=java ANDROID_GRADLE=<path_to_gradle>/bin/gradle SECURED=1
    • Example:
      scons SDK=java MODULE=ri SECURED=0 ANDROID_GRADLE=<path_to_gradle>/bin/gradle RELEASE=1
  • Executable Jar with necessary files will be created in bin/java/<MODULE> directory

Arduino TC Build

  • [Precondition: For Uploading Binary]
    1. Go to this directory: “<iotivity>/test/build/arduino”
    2. Open SConscript file
    3. Go the bottom where if(env['UPLOAD'] == True): block is written
    4. Uncomment one env.Upload() call for the binary which you are going to build and upload
    5. Comment all the other env.Upload() calls
    6. Save the file and proceed with TC Build
  • TC Source Build
    • Connectivity Abstraction(CA) Arduino TC:
      1. Things to remember
        1. There are multiple test suites and multiple shields in CA Arduino. At one time, only one suite can be uploaded in one shield. Before build, comment all the unneeded suite’s env.Upload() and uncomment the needed suite’s env.Upload() in Sconscript from path: “<iotivity>/test/build/Arduino”
        2. For some suites, simulator will be needed [Uncomment the simulator env.Upload(CASimulator)] and build using another Arduino device
        3. While building TC
          1. Make sure to pass parameter “UPLOAD=false” if you don’t need to upload tc binary into device
          2. Change parameter TARGET_PORT if for given port upload does not work
      2. TC Build Command:
        1. Go to “<iotivity>/test” folder and run different commands for building for different shields (UPLOAD and TARGET_PORT parameters can be changed as intended):
        2. For Ethernet shield:
          $ sudo scons TARGET_OS=arduino TARGET_SERVICE=ca TARGET_TRANSPORT=IP SHIELD=ETH TARGET_ARCH=avr BOARD=mega TARGET_PORT=<dev/ttyACM0/ dev/ttyACM1> UPLOAD=<true/false> ARDUINO_HOME=<your_arduino_path>
        3. For Wifi shield:
          $ sudo scons TARGET_OS=arduino TARGET_SERVICE=ca TARGET_TRANSPORT=IP SHIELD=WIFI TARGET_ARCH=avr BOARD=mega TARGET_PORT=<dev/ttyACM0/ dev/ttyACM1> UPLOAD=<true/false> ARDUINO_HOME=<your_arduino_path>
        4. For BLE shield:
          $ sudo scons TARGET_OS=arduino TARGET_SERVICE=ca TARGET_TRANSPORT=BLE SHIELD=RBL_NRF8001 TARGET_ARCH=avr BOARD=mega TARGET_PORT=<dev/ttyACM0/ dev/ttyACM1> UPLOAD=<true/false> ARDUINO_HOME=<your_arduino_path>
        5. If UPLOAD=true is used and Arduino device is connected, TC binary will be uploaded into Arduino device

Run

This section describes the extra information needed for running tc binaries for all the modules

Generic Information:

  1. You have to run simulators in Linux (for some modules) before running TCs. These simulators are built when Linux TC is built. For Linux TCs, these simulators are run automatically from the test cases. For other platforms (Android, Tizen), you have to run these simulators manually.
    1. All These simulator binaries are located at “<iotivity>/test/bin/linux” folder
  2. Firewall Activation:
    1. Activate firewall to avoid unnecessary access to other servers and client responses. To do that use the following table commands and follow the steps mentioned below.
      1. Activate Firewall using command
        $ sudo ufw enable
      2. Check Firewall status using command
        $ sudo ufw status
      3. If firewall status is active, and Server’s or Client’s IP address (in which the TC will be executed) is not showing in the terminal, add those IP address for firewall exception rule using command
        $ sudo ufw allow from <Server/Client’s IP Address>
  3. For Running Linux TC:
    1. For running Linux binaries, you have to go to “<iotivity>/test/bin/linux” path and run the binaries
      • For running all TCs, you can just execute the binary
        • Example:
          $ ./iotivity_pm_csdk_test
      • For running single TC, you can execute using –gtest_filter (which takes regular expression)
        • Command:
          $ ./binary_name –gtest_filter=<SuiteName>.<TcName/SubstringOfTcName>
        • Example:
          $ ./iotivity_pm_csdk_test --gtest_filter=PMCsdkOtmTest_btc.OCDiscoverUnownedDevices_RV_SRC_P
  4. For Running Tizen TC:
    1. For running Tizen binaries, Open a terminal and do following:
      $ sdb shell
      $ su
      $ cd <location_where_you_pushed_rpm>
      $ change-booting-mode.sh --update
      $ rpm -Uvh <your_rpm_file> --force --nodeps
      $ cd /opt/usr/media/bin [Normally this is the path where tc executables are located. You can find the path by opening the rpm file and searching for the tc executables]
      $ chmod 777 *
      $ chsmack -a "net-config" ./* && chsmack -e "net-config" ./*
      $ ./<BinaryName> [For all TC run] OR $ ./<BinaryName> --gtest_filter=< SuiteName >.<TcName> [For single TC run]
  5. For Running Android TC:
    1. For android, use com.zutubi.android.junitreport.JUnitReportTestRunner to run TCs
    2. To run all TCs from test package:
      $ adb shell am instrument -w <test package name>/com.zutubi.android.junitreport.JUnitReportTestRunner
      1. Example:
        $ adb shell am instrument -w org.iotivity.test.pm.tc/com.zutubi.android.junitreport.JUnitReportTestRunner
    3. To run a specific suite:
      $ adb shell am instrument -w -e class <classnamewithfullpackage> <test package name>/com.zutubi.android.junitreport.JUnitReportTestRunner
      1. Example:
        $ adb shell am instrument -w -e class org.iotivity.test.pm.tc.btc.PMOcProvisioningTest org.iotivity.test.pm.tc/com.zutubi.android.junitreport.JUnitReportTestRunner
    4. To run a specific TC of a suite:
      $ adb shell am instrument -w -e class <classnamewithfullpackage>#<tcname> <test package name>/com.zutubi.android.junitreport.JUnitReportTestRunner
      1. Example:
        $ adb shell am instrument -w -e class org.iotivity.test.pm.tc.btc.PMOcProvisioningTest#testDiscoverUnownedDevice_SRC_RV_P org.iotivity.test.pm.tc/com.zutubi.android.junitreport.JUnitReportTestRunner
    5. Extra information for different modules (if needed) are given below:
  6. For Running Java TC:
    1. For running Java jars, you have to go to “<iotivity>/test/bin/java” path and run the binaries
      • For running a testsuite, the syntax is
        $ java -Djava.library.path=<path_to_iotivityi_library> -jar <module>/libs/<jar_name> <package_name>.<suit_name> 
        • Example:
          $ java -Djava.library.path=../../../out/linux/x86_64/release -jar ri/libs/ri_test.jar org.iotivity.test.ri.tc.btc.RIResourceTest 
      • For running single TC, the syntax is
        $ java -Djava.library.path=<path_to_iotivityi_library> -jar <module>/libs/<jar_name> <package_name>.<suit_name>#<tc_name> 
        • Example:
          $ java -Djava.library.path=../../../out/linux/x86_64/release -jar ri/libs/ri_test.jar org.iotivity.test.ri.tc.btc.RIResourceTest#testGetResourceWithHighQos_SRC_P 

Connectivity Abstraction (CA):

Linux:

Important Notes:

  1. No need to run simulator for following test suites: CATest_btc, CANetwork_btc, CACommonTest_stc, CANetworkCommonTest_stc
  2. Simulator are required to run for following test suites: CAClientTest_stc, CAMulticastTest_stc
  3. Copy “config.ini” file from “<iotivity>/test/res/ca_resource” to “<iotivity>/test/bin/linux”

IP

Wi-Fi
  1. Precondition:
    1. Disconnect Ethernet
    2. Connect WiFi
    3. Before running “CAClientTest_stc or CAMulticastTest_stc” suites, do followings:
      1. Run Simulator in terminal
      2. Get the IP address(Wifi address with which simulator PC is connected), secured & unsecured port value from simulator and update the config.ini file (of PC where TC is running) accordingly in ”<iotivity>/test/bin/linux“
      3. Set CA_IP=1 CA_LE=0 CA_EDR=0 CA_TCP=0 in config.ini
      4. NB: Simulator and TC can be run in separate or same PC. If same PC is used, then Two terminals will be used for Simulator and TC run.
  2. Run TC and Simulator:
    1. Go To ”<iotivity>/test/bin/linux“
    2. For “CAClientTest or CAMulticastTest” suites, Open Terminal and run command:
      1. $ ./Iotivity_ca_simulator
      2. Select “IP” as network
      3. Port information will be displayed in Simulator PC
      4. Change config.ini file as mentioned above precondition. IP address with WiFi address, port as shown in simulator console and CA_IP=1
    3. Run TC binary- iotivity_ca_ip_test with proper gtest_filter
Ethernet:
  1. Precondition:
    1. Disconnect WiFi
    2. Connect Ethernet LAN
    3. Before running “CAClientTest or CAMulticastTest” suites, do followings:
      1. Run Simulator in terminal
      2. Get the IP address(Simulator PC LAN Address), secured & unsecured port value from simulator and update the config.ini file (of PC where TC is running) accordingly in ”<iotivity>/test/bin/linux“
      3. Set CA_IP=1 CA_LE=0 CA_EDR=0 CA_TCP=0 in config.ini
      4. NB: Simulator and TC can be run in separate or same PC. If same PC is used, then two terminals will be used for Simulator and TC run.
  2. Run TC and Simulator:
    1. Go To ”<iotivity>/test/bin/linux“
    2. For “CAClientTest_stc or CAMulticastTest_stc” suites, Open Terminal and run command:
      1. $ ./Iotivity_ca_simulator
      2. Select “IP” as network
      3. Port information will be displayed in Simulator PC
      4. Change config.ini file as mentioned above precondition. IP address with Simulator PC LAN address, port as shown in simulator console and CA_IP=1
    3. Run TC binary- iotivity_ca_ip_test with proper gtest_filter

Coap Over TCP

Wi-Fi
  1. Precondition:
    1. Simulator and TC will be run on different PCs.
    2. Disconnect Ethernet LAN on both PC
    3. Connect both PC with same WIFI network
    4. Before running “CAClientTest_stc” suite, do followings:
      1. Run Simulator in Terminal
      2. Update the config.ini file in ”<iotivity>/test/bin/linux“ (of PC where TC is running) with the Wifi IP and put the port value as they are shown in Simulator Console
      3. Set CA_IP=0 CA_LE=0 CA_EDR=0 CA_TCP=1 in config.ini
  2. Run TC and Simulator:
    1. Go To ”<iotivity>/test/bin/linux“ of Simulator PC
    2. For “CAClientTest_stc” suite, Open Terminal and run command:
      1. $ ./Iotivity_ca_simulator
      2. Select “TCP” as network
      3. Port information will be displayed in Simulator PC
      4. Change config.ini file as mentioned above precondition. IP address with WIFI address, port as shown in simulator console and set CA_TCP=1
    3. Run TC binary- iotivity_ca_tcp_test with proper gtest_filter
Ethernet
  1. Precondition:
    1. Simulator and TC will be run on different PCs.
    2. Disconnect WiFi on both PC
    3. Connect both PC with Ethernet LAN
    4. Before running “CAClientTest_stc” suite, do followings:
      1. Run Simulator in Terminal
      2. Update the config.ini file in ”<iotivity>/test/bin/linux“ (of PC where TC is running) with the LAN IP of simulator PC and put the port value as they are shown in Simulator Console
      3. Set CA_IP=0 CA_LE=0 CA_EDR=0 CA_TCP=1 in config.ini
  2. Run TC and Simulator:
    1. Go To ”<iotivity>/test/bin/linux“ of Simulator PC
    2. For “CAClientTest_stc” suite, Open Terminal and run command:
      1. $ ./Iotivity_ca_simulator
      2. Select “TCP” as network
      3. Port information will be displayed in Simulator PC
      4. Change config.ini file as mentioned above precondition. IP address with WIFI address, port as shown in simulator console and set CA_TCP=1
    3. Run TC binary- iotivity_ca_tcp_test with proper gtest_filter

Andorid:

IP(Wifi) & TCP(Wifi)

Important Notes:
  1. No need to run simulator for: CATest_btc, CANetwork_btc, CACommonTest_stc, CANetworkCommonTest_stc suites
  2. Simulator are required to run for: CAClientTest_stc, CAMulticastTest_stc suites
  3. Copy “config.ini” file from “<iotivity>/test/res/ca_resource/” to “/data/local/tmp/” of android device
Precondition:
  1. 2 devices required for Simulator & TC
  2. Both devices need to be connected with same WiFi network
  3. Connect the devices with PC
  4. During build command “push=true” is needed to push the binaries into both devices
  5. Simulator and TC will be run from PC using adb shell
    1. Before running “CAClientTest_stc or CAMulticastTest_stc ” suites, do followings:
    2. Run Simulator in terminal
    3. Get the secured & unsecured port value from simulator and update the config.ini file accordingly in ”/data/local/tmp/“ of Android device
    4. Set IP address with the connected Wifi address in config.ini file
    5. Push the updated config.ini into TC device
Run Simulator:
  1. Open Terminal
  2. Run simulator using “adb shell”:
    $ adb shell
    $ cd /data/local/tmp
    $ LD_LIBRARY_PATH=. ./iotivity_ca_simulator
  3. Secured and non-secured port will be shown. Update config.ini accordingly from ”<iotivity>/test/bin/Linux“
  4. Set IP address with the connected Wifi address in config.ini file
  5. push the config.ini file into TC device ”/data/local/tmp“
    $ adb push "src path"/config.ini /data/local/tmp
TC Run:
  1. Open Terminal
  2. Run TC using “adb shell”:
    $ adb shell
    $ cd /data/local/tmp
    $ LD_LIBRARY_PATH=. ./iotivity_ca_test --gtest_filter=<SuiteName>.<TcName/SubstringOfTcName>
  3. Example:
    $ LD_LIBRARY_PATH=. ./iotivity_ca_test --gtest_filter=CACommonTest_stc.CAGenerateTokenAndCADestroyTokenLoop_VLCC_P

BLE + EDR

Important Notes:
  1. No need to run simulator for: CATest, CANetwork, CACommonTest, CANetworkCommonTest, CAJavaAPINetworkTest suites
  2. Simulator are required to run for: CAEdrClientTest, CALeClientTest& CAMulticastTest suites
  3. Right now, each TC is needed to be executed individually
Precondition:
  1. 2 devices required for Simulator & TC
  2. Both devices need to be paired with each other
  3. Connect the devices with PC
  4. Before running “CALeClient, CAMulticast, CAEdrClient”, do followings:
    1. Run Simulator (server) in Simulator device
Run Simulator:
  1. Go To “test/build/android”
  2. Open Terminal
  3. Build simulator with following command:
    $ gradle ca –Pm=release  -Pc=”type=simulator” --continue
  4. Change the path of “android.mk” file in ”<iotivity>/test/src/testapp/ca/android/casimulator/sampleService/src/main/jni/“
    PROJECT_LIB_PATH = <iotivity>/test/extlibs/android/ca/armeabi
  5. Run simulator using android-studio
    1. Open Terminal from android-studio/bin
    2. show the ndk path: export ANDROID_NDK =NDK_PATH
    3. run android studio:
      $ ./studio.sh
    4. Open CASimulator project from :
      "<iotivity>/test/src/testapp/ca/android/casimulator”
    5. Run the project in simulator device
Run TC:
  1. Follow the general Android TC execution procedure mentioned in section “Run » Generic Information » 6. For Running Android TC”

Arduino:

Important Notes:

  1. No need to run simulator for: CATest, CACommonTest suites
  2. Simulator are required to run for: CAClientTest, CAMulticastTest suites

TC and Simulator Run:

  1. You need to use serial monitor for running TC/Simulator:
    1. Go to your Arduino IDE location
    2. Open arduino using terminal
      $ sudo ./arduino
    3. Open Serial Monitor [Tools>Serial Monitor]
      1. If serial monitor does not open, change the port [Tools>Port]
  2. Using Serial Monitor, run simulator before running TC [If needed]
  3. Run TC using Serial Monitor [Not in the same device as simulator]
    1. While running TC, provide necessary parameters in the serial monitor [like TCName, IP]

Tizen:

Important Notes:

  1. No need to run simulator for: CATest_btc, CANetwork_btc, CACommonTest_stc, CANetworkCommonTest_stc suites
  2. Simulator are required to run for: CAClientTest_stc, CALeClientTest_stc, CAMulticastTest_stc suites
  3. For BLE: No pairing is required for two devices
  4. For EDR: Pairing is required for two devices
  5. For WIFI: Devices are needed to connect to same Wi-Fi network

TC and Simulator Run:

  1. Go to the RPM location
  2. Push RPM “com-oic-ca-0.1-1.armv7l.rpm” and “com-oic-ca-sim-0.0.1-1.armv7l.rpm” into two(2) Tizen devices using sdb push command
  3. Install RPMS
  4. Go to ”/usr/apps/com.oic.sim/bin“ and ”/usr/apps/com.oic/bin“ location for respective devices.
  5. Copy all files to this location: “/opt/usr/media/bin” for both the devices
  6. Consider one device as simulator side(Server) and another as TC side(Client)
  7. Go to “/opt/usr/media/bin” location for simulator and run command : $./iotivity_ca_simulator and “select network” then “Server/Client” as your requirement
  8. After running simulator: get simulator ports and address. Update the config.ini file from location: “<iotivity>/test/bin/linux” and then push into the client side
  9. In TC side, run TC/client binary file using $./[binary file name]

Provisioning Manager(PM):

Test Case Execution:

Linux:

  1. Precondition:
    1. Creating an Isolated Network which only consists of:
      1. Devices in which the Test Cases will be executed
      2. Devices from where the simulators will be run
  1. Run TC
    1. Go to <Iotivity Home>/test/bin/linux
    2. Run following Binary to setup initial environment : iotivity_pm_client
    3. Run following TC binaries to execute TC : iotivity_pm_csdk_test and iotivity_pm_cpp_test for CSDK API and CPP API test. (TC should be run in standalone mode)

Tizen:

  1. Precondition:
    1. Creating an Isolated Network which only consists of:
      1. Devices in which the Test Cases will be executed
      2. Devices from where the simulators will be run
  1. Run TC
    1. Go to /opt/usr/media/bin
    2. Run following Binary to setup initial environment : iotivity_pm_client
    3. Run following TC binaries to execute TC : iotivity_pm_csdk_test and iotivity_pm_cpp_test for CSDK API and CPP API test. (TC should be run in standalone mode)

Android

  1. Precondition
    1. Creating an Isolated Network which only contains:
      1. Android device in which the Test Cases will be executed
      2. Workstation from where the simulators and cloud servers will be run
    2. Building Simulators Generating Their Resources
      1. Follow the Test Case Build command for PMC or PMCPP (Linux). That will build the simulators in following path:
        “<IOTIVITY_ROOT>/test/bin/linux”
  2. Run TC
    1. Start TCPTestServer from
      “<IOTIVITY_ROOT>/test/bin/linux”
    2. Start TCPAndroidClient from Target Android Device
    3. Execute TC from targeted android device

Inter-Op App Execution:

Linux:

  1. Precondition:
    1. Creating an Isolated Network which only contains:
      1. Device in which the Test Cases will be executed
      2. Workstation from where the simulators will be run
  2. Run App:
    1. Go to <Iotivity Home>/test/bin/linux
    2. Set LD_LIBRARY_PATH to <Iotivity Home>/out/linux/x86/<release/debug>
    3. Run Following Binaries for C and CPP Test Respectively to run C or CPP app
      1. pmc_test_app
      2. pmcpp_test_app
  3. Post-condition:
    1. After Each test case execution, delete .db and .dat files
    2. Copy all .dat files from Go to <Iotivity Home>/test/bin/ to <Iotivity Home>/test/bin/linux

Android

  1. Precondition:
    1. Creating an Isolated Network which only contains:
      1. Android device in which the Test Cases will be executed
      2. Workstation from where the simulators will be run
  2. Run App
    • Run application from Android Device
  3. Post-condition
    • After Each test case execution, reinstall the apk file.

CLOUD ACL (Security) (CS):

Test Case Execution:

Linux:

  1. Precondition:
    1. Run all cloud servers before executing TCs. For more detail: visit https://wiki.iotivity.org/iotivity_cloud_-_programming_guide
    2. Cloud Interface Server Should be run in Local Host with Port 5683
    3. Make sure in which mode the servers are running (TLS Enabled or Disabled)
  2. Run TC:
    1. Go to <Iotivity Home>/test/bin/linux
    2. Run following binary for initial setup : iotivity_cs_server
    3. Run following binaries to execute the TCs depeneding on CSDK/CPP API in in TLS MODE On/Off
      1. iotivity_cs_csdk_tlsoff_test (CSDK + TLS OFF)
      2. iotivity_cs_cpp_tlsoff_test (CPP + TLS OFF)
      3. iotivity_cs_csdk_tlson_test (CSDK + TLS ON)
      4. iotivity_cs_cpp_tlson_test (CPP + TLS ON)
  1. Special Note:
    1. In 32 bit PC MongoDb should be started manually.

Tizen:

  1. In 1.3.0 CS Tizen is out of scope

Android:

  1. In 1.3.0 CS Android is out of scope

Inter-Op App Execution:

Linux

  1. Run all cloud servers before executing TCs. For more detail: visit https://wiki.iotivity.org/iotivity_cloud_-_programming_guide.
  2. Go to iotivity/out/linux/x86/debug/resource/csdk/security/provisioning/sample
  3. Execute cloudClient and cloudServer App

Android

  1. Currently no app available in android

Resource Introspection (RI):

Build Precaution

  1. For RI, both IoTivity & Testcase *must* be built using SECURED=0

Test Case Execution:

Linux

  1. Simulators are run inside TCs automatically

Android and Tizen

  1. Simulators are run inside TCs automatically

Inter-Op App Execution:

  1. ./InterOpAppRI

Resource Hosting (RH):

Test Case Execution:

Linux:

  • Simulators are run from TCs automatically.

Android and Tizen

  • Precondition
    • Before Running TC for Android and Tizen, you have to run simulators. Simulators are:
    • rh_non_hostable_provider, rh_provider, rh_provider2, rh_manager, rh_consumer [run simulators in this order]

Inter-Op App Execution:

Resource Encapsulation(RE):

Test Case Execution:

Linux:

  • Simulators are run from TCs automatically.

Android and Tizen

  • Precondition
    • Before Running TC for Android and Tizen , you have to run a simulator in linux. Simulators is:
      • ./iotivity_re_server

Inter-Op App Execution:

Things Manager(TM):

Test Case Execution:

Linux:

  • Simulators are run from TCs automatically.

Android and Tizen

  • Precondition
    • Before Running TC for Android and Tizen, you have to run simulators. Simulators are: testserver,bootstrapserver,unsupportivetestserver,testcollection

Inter-Op App Execution:

Scene Manager(SM):

Test Case Execution:

Linux

  • Simulators[lightserver, fanserver & sceneserver] are run from TCs automatically

Inter-Op App Execution:

Linux

  1. ./iotivity_sm_app

Resource Directory(RD):

Test Case Execution:

Linux

  • Simulators rd_server run from TCs automatically

Inter-Op App Execution:

Easy Setup(PHY):

Test Case Execution:

Android

  1. Build command
    1. Go to iotivity/test/build/android directory
    2. run gradle es
  2. Precondition
    1. You have to keep an enroller open before running mediator TCs
  3. Execute TC
    1. Execute the test case

Linux

  1. Build command
    1. Go to iotivity/test/ directory
    2. run scons TARGET_OS=linux MODULE=es ES_ROLE=enrollee/mediator
    3. Precondition
    4. You have to keep an enroller open before running mediator TCs and mediator open before running enrollee TCs
  2. Execute TC
    1. Set LD_LIBRARY_PATH to <Iotivity Home>/out/linux/x86/<release/debug>
    2. Execute the following binary files
      • iotivity_es_enrollee_test
      • iotivity_es_mediator_test

Tizen

  1. Build command
    1. Go to iotivity/test/ directory
    2. run scons TARGET_OS=tizen MODULE=es ES_ROLE=enrollee
    3. Push following rpm file into tizen device
      1. iotivity-1.2.0-0.armv7l.rpm
      2. iotivity-devel-1.2.0-0.armv7l.rpm
      3. iotivity-service-1.2.0-0.armv7l.rpm
      4. org.tizen.ES_UTC_ITC-0.0.1-1.armv7l.rpm
      5. install those rpm into tizen device
  2. Precondition
    1. You have to keep an mediator open before running TCs
  3. Execute TC
    1. Go to usr/bin/es/
    2. Execute the following binary files iotivity_es_enrollee_test

Inter-Op App Execution:

Android

  1. Precondition
    1. Run enrollee (linux or tizen)
    2. If you run enrollee in secured mode then press Enable Security
    3. Start easy setup
    4. Install android mediator app in android device
  2. Run app
    1. Run Easy Setup app in device
    2. Discover the enrollee resource

Linux

  1. Precondition
    1. Run enrollee (linux or tizen)
    2. If you run enrollee in secured mode then press Enable Security
    3. Start easy setup
  2. Run
    1. Run mediator_rich binary
    2. Discover the enrollee resource

Resource Container(RC):

Test Case Execution:

Tizen

  • Precondition
    • You have to copy 5 files to Tizen device [libBMISensorBundle.so, libDISensorBundle.so, libHueBundle.so, ResourceContainerConfig.xml, ResourceContainerEmptyConfig.xml]
    • Run Linux TCs for generating these files
    • These files will be generated in this directory- “<iotivity>/test/bin/linux”
    • Copy these files to Tizen device to this directory- “/usr/bin/rc/”

Inter-Op App Execution:

Cloud Interface (CI):

Test Case Execution:

Linux

  1. Precondition
    • Start Zookeeper server from <kafka_root_dir> using command -[bin/zookeeper-server-start.sh config/zookeeper.properties]
    • Start Kafka server from <kafka_root_dir> using command -[bin/kafka-server-start.sh config/server.properties]
    • Run all cloud servers before executing TCs.
    • For more detail(Iotivity Source Build, Build servers): visit https://wiki.iotivity.org/iotivity_cloud_-_programming_guide
  2. Execute TC

Linux:

  1. Precondition:
    1. Run all cloud servers before executing TCs. For more detail: visit https://wiki.iotivity.org/iotivity_cloud_-_programming_guide
    2. Cloud Interface Server Should be run in Local Host with Port 5683
    3. Make sure in the servers are running in TLS Mode Disabled.
  2. Run TC:
    1. Go to <Iotivity Home>/test/bin/linux
    2. Run following binary for initial setup : iotivity_ic_server
    3. Run following binary to execute TC : iotivity_ic_test
  1. Special Note:
    1. In 32 bit PC MongoDb should be started manually.

Tizen

  1. Build command
    1. Go to iotivity/test/ directory
    2. run scons TARGET_OS=tizen MODULE=cloud
    3. Push following rpm file into tizen device
      1. iotivity-1.2.0-0.armv7l.rpm
      2. iotivity-devel-1.2.0-0.armv7l.rpm
      3. iotivity-service-1.2.0-0.armv7l.rpm
      4. org.tizen.IC_UTC_ITC-0.0.1-1.armv7l.rpm
      5. install those rpm into tizen device
  2. Precondition
    1. Start Zookeeper server from <kafka_root_dir> using command -[bin/zookeeper-server-start.sh config/zookeeper.properties]
    2. Start Kafka server from <kafka_root_dir> using command -[bin/kafka-server-start.sh config/server.properties]
    3. Run all servers before executing TCs
  3. Execute TC
    1. Go to usr/bin/ic/
    2. Execute the following binary files iotivity_ic_test

Android

  1. Build command
    1. Go to iotivity/test/build/android directory
    2. run gradle ic
  2. Precondition
    1. Start Zookeeper server from <kafka_root_dir> using command -[bin/zookeeper-server-start.sh config/zookeeper.properties]
    2. Start Kafka server from <kafka_root_dir> using command -[bin/kafka-server-start.sh config/server.properties]
    3. Run all servers before executing TCs.
  3. Execute TC
    1. install ictest-debug.apk on android device and run TCs

Inter-Op App Execution:

Linux

  1. Build command
    1. Go to iotivity/test/ directory
    2. run scons TARGET_OS=linux MODULE=ci
  2. Precondition
    1. Run all servers before executing TCs.
  3. Execute APP
    1. Set LD_LIBRARY_PATH to <Iotivity Home>/out/linux/x86/<release/debug>
    2. Execute the following binary files - cloud_test_app

Android

  1. Precondition
    1. Run all servers
  2. Run app
    1. Run simple Base application
    2. Press menu then select cloud
    3. Execute the available features

Linux

  1. Precondition
    1. Run all servers
  2. Run binary
    1. Go to iotivity/out/linux/x86/release/cloud/samples/client
    2. Set LD_LIBRARY_PATH to <Iotivity Home>/out/linux/x86/<release/debug>
    3. Execute binaries
iotivity_api_test_guide.txt · Last modified: 2018/10/24 05:44 by Sanjay Kumar