Synology Testing System

Introduction

Object

  • 與 build system 串接
    • 每版跑 test
    • 每版跑 performance test
  • 提供統一介面運行各種 test
    • regression test
    • performance test
    • unit test
    • ...
  • 任何 RD/QC 都可輕易利用這套 framework 跑 test

Phase1 + Phase2 (Now)

  • synoci framework
  • Test case group
  • Connect with Build System
    • new dsm version
    • new package version
  • Send mail whenever test is failed

Phase3

  • Wishing fountain
  • Support Unit Test (discuss...)
  • Support other branch
  • Fix bugs
  • Accelerate setup

Test System Architecture

Demo

Projects

SynoCI Tools

  • mkpyenv

  • synoci

  • ds-installer

mkpyenv

  • Create environment for CI system
# apt-get install -y \
    curl \
    libffi-dev \
    libssl-dev \
    python-dev \
    python-openssl \
    python-software-properties \
    software-properties-common
  • Pre-requirement

Demo

synoci

% ./bin/synoci -h
usage: synoci [COMMAND] [OPTIONS]

optional arguments:
  -h, --help  show this help message and exit

commands:

  Genereral commands:
    list          List tasks of the suite
    update        Update environment setting
    log           Show last run result log of the suite
    list_suites   List all suites

  Code generate commands:
    new           Create a testsuites template
    gen           Generate a testcase
    gen_webapi    Generate a webapi testcase
    del           Undo code generate with "generate"

  Run the tests:
    run           Run tests
    utest         Run unittest

Demo

% ./bin/ds-installer -h
usage: ds-installer [COMMAND] [OPTIONS]

optional arguments:
  -h, --help  show this help message and exit

Description:
  This tool provide a cli way to install:

    - DSM (clean install or just upgrade ver)
    - Packages

  Commands:
    dsm          DSM installer
    package      Package installer

  Usage Example:

  ./ds-installer dsm --mac 00:11:22:33:44:55 -v 7307 -p pwd
  ./ds-installer dsm -U --ip 192.168.55.66
  ./ds-installer package --ip 192.168.61.61 -p pwd Docker

ds-installer

Demo

Test Case

Test Example

  • setup example

  • webapi example

  • command line example

  • unittest example

Demo

Setup Self Test Labs

MailPlus Server

  • Need to setup mail clients

  • Need prepared ldap server

  • Need prepared DNS server

SHA/AHA

  • Need specific platform

  • Need machine nework prepared

Rules

System

  • Only define following in config.py of suite would be run by test
    • _SYNOCI_TEST_TYPE = 'PACKAGE|DSM' 
  • Each suite run over 1hr would be killed
  • Only run basic group for daily build

Synology Testing System

By nit nit

Synology Testing System

  • 69