Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !1011

Merged
Created Jul 08, 2021 by Xavier Thompson@xavier_thompsonOwner

slapos-sr-testing: Add instance parameters to filter what is tested

  • Overview 8
  • Commits 1
  • Changes 2

Introduce parameters to choose which SRs are tested and what arguments are passed to python -m unittest:

  • only-sr: a list of software releases names to test
  • unittest-args: a list of arguments for unittest

The default behavior (when neither only-sr nor unittest-args is given) is the same as before:

  • all the SRs are tested
  • the test command is python -m unittest discover -v, which runs all the tests in all the modules of the form test*.py

But now we can do things like:

{
  "only-sr": "theia",
  "unittest-args": "test.TestTheia.test_http_get"
}

which will only launch python -m unittest test.TestTheia.test_http_get in the theia SR.

Such parameters can be specified via the Slapos Parameters field of a test suite.

Several SRs can be specified using a list of strings instead of a single string, and the same for several arguments.

For example: "unittest-args": ["-v", "test.TestTheia.test_http_get"]

This is a spin-off from Theia Resiliency MR !931 (merged), where it was introduced to provide a convenient way to launch ERP5-in-Theia resiliency tests separately from other tests. See this comment for more details.

Edited Jul 08, 2021 by Xavier Thompson
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: sr_testing_parameters
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7