8000 GitHub - openstacks/opentmi: OpenTMI (Test Management Infrastructure) Core
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

openstacks/opentmi

 
 

Repository files navigation

OpenTMI

Open Source Test Management Infrastructure for IoT and embedded world.

Build Status Dependencies Status devDependencies Status Greenkeeper badge

OpenTMI is Open Source Test Management System. It is written in Node.js / Javascript and uses MongoDB as backing store. It is published in GPLv3 license. OpenTMI is extremely customizable through addons.

screenshot

Ideology

Basic idea is to store all information related to test execution to database, like software under test (SUT/Build), test logs, test cases (TC), and test related resources, like DUT's. That allows then much more intelligent and more efficient way to manage testing. Also it gives very valuable information when users can directly see what is tested in individual Device with individual Build. All information is linked together and can be analyzed very deeply.

Challenges with SW testing in IoT HW

  • how to identify when test failed because of unstable HW
  • how to identify unique unstable HW i 8000 n test lab
  • how to identify if certain test causes that HW's become unstable/unusable
  • how to estimate when HW start to be unstable/unusable (e.g. memory start burning out)
  • how to direct testing to right HW when there is multiple HW configurations
  • how to identify if tools deployment (e.g. new test framework revision) causes more test failures
  • how to execute right tests for different purpose if cannot run all of them for every commit (eg because of too long execution time)
  • how to manage all of these automatically

OpenTMI try to solve these kind of challenges using "big-data".

Pre-requirements

  • Node.js v6.1< (tested with 6.1, recommended to use latest LTS version)
  • mongodb v3.2< (recommented to use latest version)

Installation

From Dockers

docker pull opentmi/opentmi:latest mongo:latest
docker run -v "$(pwd)":/data --name mongo -d mongo mongod --smallfiles
docker run --name opentmi -p 3000:3000 --link mongo:mongo -d opentmi/opentmi

See here for more instructions.

Clone, install dependencies and start

Prepare

You need to install mongodb and run it. File mongod.sh contains simple script to start single mongod instance (db location ./db and logs ./db.logs) - that is not recommended for production usage.

> git clone --recursive https://github.com/OpenTMI/opentmi
> cd opentmi
> npm install
> npm start

or start without clustered mode

> node app

Note: Installation install also all addons dependencies so you doesn't need to worry about it.

Command line

$ npm start -- -h
Usage: npm start -- (options)

Options:
  --listen, -l   set binding interface             [string] [default: "0.0.0.0"]
  --https        use https                                      [default: false]
  --port         set listen port                      [required] [default: 3000]
  --env, -e      Select environment (development,test,production)
                                               [string] [default: "development"]
  --verbose, -v  verbose level                                           [count]
  --silent, -s   Silent mode                                    [default: false]

https: Generate self-signed ssl certifications:

  • ./scripts/gencerts.sh
  • start daemon with --https -options (npm start -- -https)

Clustered mode

OpenTMI support clustered mode which gives some benefits in production environment:

  • better performance
  • zero downtime when updating
  • auto restart on failure
  • serve more clients
  • better performance

API documentation

Available here

Configuration

By default it start server as development mode. You can configure environment using env.json

{
  "OPENTMI_BIND": "0.0.0.0",
  "OPENTMI_PORT": 80,
  "WEBTOKEN": "token",
  "MONGODB": "mongodb://localhost/opentmi",
  "FILE_DB": "./data",
  "OPENTMI_ADMIN_USERNAME": "admin",
  "OPENTMI_ADMIN_PASSWORD": "admin",
  "GITHUB_CLIENTID": "ID",
  "GITHUB_SECRET": "SECRET",
  "GITHUB_ORG": "ORGANIZATION",
  "GITHUB_CBURL": "GITHUB_CBURL",
  "GITHUB_ADMINTEAM": "ADMIN-TEAM"
}

Architecture

Addons

Way to extend backend-service functionality. Addon registry (future plan) contains information about existing addons, which can easily to install via administrator API. More documentation can be found from here

Test

npm test

Contribution guidelines

  • Writing tests
  • Code review
  • Other guidelines

See code-of-conduct

Production usage

Propose to use some service management tool which can restart service if it for some reason crashes.

You can use for example:

Note: if your service management is storing stdout and stderr to log files - be sure that it is rotated properly to ensure that disk space doesn't cause trouble. By default OpenTMI store logs log/ -folder, configured as daily rotate.

Who do I talk to?

  • Repo owner or admin
  • Other community or team contact

License

GPL-3.0

About

OpenTMI (Test Management Infrastructure) Core

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.1%
  • Shell 1.9%
0