Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. After you write your test cases and you execute the command to test it out (i.e. When I run "pbs_benchpress -t CgroupsTests") on your test you may get an error message like
    "2016-08-15 21:37:05,960 ERROR    unknown testsuite(s): TestCgroups" TestCgroups", I get "unknown testsuite: TestCgroups" error, even though "TestCgroups" is a valid test suite name. How do I resolve this?
    1. To resolve this try to first run python -tt <ptl_test_file> to verify that no syntax error were made
    2. If test file has executable permission then remove it (recommended permission for test file is 0644)
    3. If that doesn't work provide the path to the ptl_test_file using the -f
      1. pbs_benchpress -f pbs_cgroups_tests.py -t TestCgroups
  2. Should I run the PTL test suite on my production environment?
    1. Never run ptl test cases in the production environment. It will only take once before you regret it. PTL is designed to delete all of the job and restore the system to the default config that it needs to run the tests
  3. Where should I place the new tests.?
    1. I recommend placing them under pbspro/test/tests
  4. What should I name the tests?
    1. Follow instructions from this page
  5. How can I find the file when pbs_benchpress cant find it?
    1. pbs_benchpress -f <my_tests.py>
  6. How can I run only a specific test?
    1. For example if I had a test suite called TestCgroups in file pbs_cgroups_tests.py I would execute the following
      1. pbs_benchpress -f pbs_cgroups_tests.py -t TestCgroups
    2. If I wanted to run two specific tests in the TestCgroups I would do
      1. pbs_benchpress -f pbs_cgroups_tests.py -t TestCgroups.test_t4b,TestCgroups.test_t4c
  7. Is custom tearDown() necessary? if we define custom tearDown() explicitly in test, do we need to call parent class teardown()?

    1. If test case is doing some operations which PTL does not revert for example "changing system configuration" then test case should define custom tearDown().

    2. If custom tearDown() defined then it should do reverting test case specific operations example "changing system configuration" then call parent class tearDown().
    3. If PTL revert function don’t revert some of PBS settings then should that be treated as PTL bug/enhancements

  8. How can I run all tests under the 'functional' directory?
    1. Try the "--follow-child" option to pbs_benchpress:
      1. pbs_benchpress -t TestFunctional --follow-child

Site Map

Developer Guide Pages