Coder Social home page Coder Social logo

sdl_atf's Introduction

Automated Test Framework (ATF)

Dependencies:

Library License
Lua libs
liblua5.2 MIT
json4lua MIT
lua-stdlib MIT
lua-lpeg
Qt libs
Qt5.3 WebSockets LGPL 2.1
Qt5.3 Network LGPL 2.1
Qt5.3 Core LGPL 2.1
Qt5.3 Test LGPL 2.1
Other libs
lpthread LGPL
libxml2 MIT

For ATF usage: sudo apt-get install liblua5.2 libxml2 lua-lpeg

Get source code:

$ git clone https://github.com/smartdevicelink/sdl_atf
$ cd sdl_atf
$ git submodule init
$ git submodule update

Compilation:

1 Install 3d-parties developers libraries sudo apt-get install liblua5.2-dev libxml2-dev lua-lpeg-dev

2 Install Qt5.3+

Download Qt5.3+

sudo chmod +x some-qt-build.run
./some-qt-build.run

2 Setup QMAKE environment variable to path to qmake export QMAKE=${PATH_TO_QMAKE} You can get path to qmake this way:

$ sudo find / -name qmake
/usr/bin/qmake
/opt/Qt5.3.1/5.3/gcc/bin/qmake

/usr/bin/qmake in most cases does not work as it is just soft link to qtchooser

2 $ make

  1. If during executing "make" command you have the following problem: Project ERROR: Unknown module(s) in QT: websockets

Solution: You have to change location of qmake in Makefile in atf root directory Find location of qmake executable on your local PC: (It should look like: .../Qt/5.3/gcc_64/bin/qmake)

and put it into Makefile to the line: QMAKE= Sometimes you will need reinstall QT Creator to get correct qmake executable Also you can open QT Creator. Then go to: Tool->Options->Build & Run. Find Qt Versions Tab. Here you can find qmake location.

Run:

./start.sh [options] [script file name]

Useful options:

Path to SDL

You can setup path to SDL via command line with --sdl-core option.

Example :

./start.sh --sdl-core=/home/user/development/sdl/build/bin ./test_scripts/ActivationDuringActiveState.lua

Or via config file(modules/config.lua) with config parameter

Example : ATF config : modules/config.lua :

config.pathToSDL = "home/user/development/sdl/build/bin"

also you can copy modules/config.lua to root and rename to local_config.lua. local_config.lua is added to .gitignore

Usage example:

./start.sh -clocal_config.lua ATF_script.lua 

Connect ATF to already started SDL

ATF is able to connect to already started SDL. Note that you should be sure that:

  • ATF is configured not to start SDL
  • SDL is configured not to start HMI
  • mobile and HMI sockets options match each other in SDL and ATF configs.

Example :

ATF config : modules/config.lua :

config.autorunSDL = false
config.hmiUrl = "ws://localhost"
config.hmiPort = 8087
config.mobileHost = "localhost"
config.mobilePort = 12345

SDL config : smartDeviceLink.ini :

[HMI]
; Open the $LinkToWebHMI in chromium browser
LaunchHMI = false
; WebSocket connection address and port
ServerAddress = 127.0.0.1
ServerPort = 8087
[TransportManager]
; Listening port form incoming TCP mobile connection
TCPAdapterPort = 12345

Run tests

make test

sdl_atf's People

Contributors

abyzhynar avatar agaliuzov avatar amikhniev avatar anatoliy-leshin avatar anosach-luxoft avatar luxoftakutsan avatar nk0leg avatar oherasym avatar pestoo avatar sergii-levchenko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.