Skip to content

how to create tests

Kohei Noda edited this page Mar 19, 2024 · 13 revisions

How to create tests

  • If you want to create a new test, follow the steps below.
  • If you want to write a python script for the test, import the useful functions for testing from test/module_testing.py.
  1. Install questionary, which is a dependency library for running the test-build script.
pip install questionary
  1. Execute tools/dcaspt2_test_generator to create a test.
    • An interactive CLI tool will start, and the test will be automatically created by answering some questions.
      • But if you select "unit test", a test template will be automatically created because the work varies depending on what you want to test, so you need to write the test logic yourself.
  2. After running dcaspt2_test_generator, move to the top-level directory of this program, build, and then run the test to check if the added test is executed and passes.