User Tools

Site Tools


inter-operability_test_application_guide

Inter-op App Build

Linux

  • 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
      • actual: linux
    • MODULE: Module (ca|ic|ns|pm|rc|re|ri|sm)
      • Enter module name which you want to build
    • TEST: Test(all|tc|app)
      • default: all
    • TARGET_ARCH: Target architecture (x86|x86_64|arm|arm64)
      • default: x86
      • actual: x86
    • TARGET_TRANSPORT: Target transport (BT|BLE|IP|all)
      • default: all
    • RELEASE: release/debug
      • allowed values: RELEASE=0(debug)/RELEASE=1(release)
      • default: release
      • actual: release
  • Example:
    $ scons TARGET_OS=linux MODULE=re TEST=app
  • TC binaries will be located at “<iotivity>/test/bin/linux”
    • If you face “Checking for C++ library… ” , go to IotivityOrgSource/<target/last>/iotivity and open config.log file and find the root cause.
      • 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 has 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”

Android

  • Connect android device and Go to “<iotivity>/test/build/android” folder
  • Follow one of these procedures
    • Run the following command for module wise build:
      $ gradle <module_name>  –Pm=<release/debug> -Papp
    • Example:
      $ gradle tm –Pm=release
    • If want to continue with build error:
      $ gradle <module_name>  –Pm=<release/debug> --continue
    • To build all module together:
      $ gradle all --continue
  • 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
      • Run native_build.sh from “<iotivity>/test/build/android/ca/gtest” by using terminal:
        $ ./native_build.sh clean=true android_ndk=<ndk_path>
      • To build & push the binaries into device run this:
        $ ./native_build.sh push=true clean=true android_ndk=<ndk_path>
    • BLE + EDR
      • Go to “<iotivity>/test/build/android” folder and run following command:
        $ gradle ca –Pm=release --continue

Inter-op App Run

Provisioning Manager(PM):

Linux

  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:
    1. Go to <Iotivity Home>/test/bin/linux
    2. Run Following Binaries for C and CPP Test Respectively to run csdk or cpp app
      1. iotivity_pm_csdk_app
      2. iotivity_pm_cpp_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):

Linux

  1. Run all cloud servers before executing TCs.
  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

ResourceIntrospection (RI):

Linux

Run InterOpAppRI:

From the test directoty (<iotivity_root>/test), go to linux binary folder:

  $ cd bin/linux/

To run InterOpAppRI using default settings( Non-confirmable, IPv6, unsecured server & client):

  $ ./InterOpAppRI

Run InterOpAppRI with customize settings:

  $ ./InterOpAppRI [QoS<0/1>] [IP_Version<4/6>] [Security<-1/2>
    ./InterOpAppRI 1 4 2

Argument Type:

QoS:

  0 = NON (Non-Confirmable Message)
  1 = CON (Confirmable Message)

IP_Version:

  4 = IPv4
  6 = IPv6

Security:

  1 = secured client
  2 = secured server

Example:

  $ ./InterOpAppRI 1 4 1 It’s for, CON Server IPv4 secure_client
  $ ./InterOpAppRI 1 4 2 It’s for, CON Server IPv4 secure_server
  $ ./InterOpAppRI 0 4 1 It’s for, NON Server IPv4 secure_client
  $ ./InterOpAppRI 0 4 2 It’s for, NON Server IPv4 secure_server
  $ ./InterOpAppRI 1 6 1 It’s for, CON Server IPv6 secure_client
  $ ./InterOpAppRI 1 6 2 It’s for, CON Server IPv6 secure_server
  $ ./InterOpAppRI 0 6 1 It’s for, NON Server IPv6 secure_client
  $ ./InterOpAppRI 0 6 2 It’s for, NON Server IPv6 secure_server

Resource Hosting (RH):

Resource Encapsulation(RE):

Linux

  1. Build command
    1. Go to iotivity/test/ directory
    2. run scons TARGET_OS=linux TARGET_ARCH=x86 MODULE=re TEST=app
  2. Run App:
    1. Go to bin/linux
    2. Run iotivity_re_app .
  3. Post-condition:
    • After Each test case execution, Exit the app.

Android

  1. Build command
    1. Go to iotivity/test/build/android directory
    2. run gradle re -Pm=release -Parch=x86 -Papp
  2. Run App
    • Run application from Android Device
  3. Post-condition
    • After Each test case execution, reinstall the apk file.

Things Manager(TM):

Scene Manager(SM):

Linux

  1. Build command
    1. Go to iotivity/test/ directory
    2. run scons TARGET_OS=linux TARGET_ARCH=x86 MODULE=sm TEST=app
  2. Run App:
    1. Go to bin/linux
    2. Run iotivity_sm_app .
  3. Post-condition:
    • After Each test case execution, Exit the app.

Resource Directory(RD):

Easy Setup(PHY):

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):

Cloud Interface (CI):

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
inter-operability_test_application_guide.txt · Last modified: 2018/07/20 13:02 by Kousthubha M N