Giter VIP home page Giter VIP logo

testdummy's Introduction

Details on setting up the test application

First, you need a mobile_test.json file at the root folder of repository.

{
  "build": { "ios": "./build_ios.sh", "android": "./build_droid.sh" },
  "binary_path": { 
    "ios": "platforms/ios/build/device/HelloWorld.app", 
    "android": "platforms/android/build/outputs/apk/android-release-unsigned.apk" 
  },
  "target": "all",
  "priority": "normal",
  "csname": { "android": "com.example.hello", "ios": "com.example.hello" },
  "timeout": 150,
  "serverScript": "serverApp/"
}
build : Build script
binary_path: The location of the compiled app (relative to repository root)
target: test target -> all, android, ios
priority: normal, asap (normal or as soon as possible)
csname: application identifier name
timeout: max time for test in seconds (consider 150 as min)
serverScript: script folder location (to run during the test) (i.e. coordonation server)

About Integration Server

  • serverScript path should have an index.js for the server application entry point

  • serverScript receives a JSON command line parameter as given below;

jx index.js "{devices:{ios:4, android:5}}"
  • serverScript default host ip is 192.168.1.150

  • serverScript server's port 8060 is reserved

Toggle WiFi and Bluetooth on Android!!!

By Default Bluetooth and WiFi is disabled for all the Android devices and test is expected to turn them off on exit.

See Below; (Use that function to finalize the test!)

Basics of using CI

  • You should tell the testing system that application is ready to exit. See sample code below.
var end = function(failed){
  var msg = "SUCCESS"
  if (failed)
    msg = "FAILED";
  Mobile.toggleBluetooth(false, function() {
    Mobile.toggleWiFi(false, function() {
      console.log("****TEST TOOK: ", Date.now() - start, " ms ****" );
      console.log("****TEST_LOGGER:[PROCESS_ON_EXIT_" + msg + "]****");
    });
  });
};
  • Add Test System's IP address to Repository->Settings->Web Hook->Add Webhook

  • !!!!Select only Pull Request!!!!

That's all (see this repo's webhook for IP address)

Important

See build_android.sh and build_ios.sh files for ERROR_ABORT approach. It's important to exit the script with an error code in order to notify node manager.

When a new webhook is defined on a repository, test system tests the master branch first and reports the issues by creating a new issue on the repo.

Make sure any test is no longer than 35 mins

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.