Skip to content

Adding Test Job

Komnus丶Q edited this page Jul 6, 2022 · 12 revisions

Overview

This Wiki page aims to provide instructions to add test jobs for components. To make sure the components are working properly, please make sure all components you want to publish are covered by test jobs. Our test frameworks will run these test jobs during the different stages of publishing. All tests should be submitted and run successfully locally before uploading to the repository. It is your responsibility to find proper test jobs for your components and adjust the jobs accordingly to integrate with our test framework.

How to add test jobs

There are two steps to adding test jobs: 1. upload test-jobs-related files, and 2. create or update tests.yml in your team's folder.

  1. upload test-jobs-related files

Your team should have a folder to include all files you upload to the repository, e.g. training team has a training folder. Under this folder, you could have many different groups (also called test_group), e.g. training team has a general group and a vision group. Under a group folder, you should have a component folder and a job folder (or other folders you might have). Under the job folder, you should include all test-job-related files for this group.

  1. create or update tests.yml in your team's folder

tests.yml is an imperative concept in the test framework. It indicates the files/folders needed for test jobs and the process of running test jobs.

#schema 
 test_group_name:
   pre: path
   post: path
   includes: 
      - path 1
      - path 2
    ...
   jobs:
      job_name:
        job: path
        pre: path
        post: path
      job_name:
        job: path
        pre: path
        post: path
      ...
 test_group_name:
   pre: path
   post: path
   includes: 
      - path 1
      - path 2
    ...
   jobs:
      job_name:
        job: path
        pre: path
        post: path
      job_name:
        job: path
        pre: path
        post: path
      ...
Clone this wiki locally