Getting Started with LyTestTools

This guide outlines the first steps to start using LyTestTools. By the end of this guide, you will be ready to write and run tests.

Prerequisites

This guide requires that you’ve completed the following:

Start Testing

Once you have the prerequisites finished, you should have everything for testing configured and ready. You can verify this by running the following command.

~/python/python -m pytest <path_to_test_file> --build-directory <path_to_build_output>

Open 3D Engine ships with a sample test that demonstrates the use of LyTestTools, located in the Tools/LyTestTools/tests/example/tests/test_system_example.py file. After compiling O3DE, you can run the sample test against your build output with the following command (run from your O3DE directory):

python -m pytest Tools/LyTestTools/tests/example/tests/test_system_example.py --build-directory <cmake-build-directory>

More Information

  • PyTest framework - Information about the framework used by LyTestTools and how it helps with writing tests.

Copyright © 2022 Open 3D Engine Contributors

Documentation Distributed under CC BY 4.0.
For our trademark, privacy and antitrust policies, code of conduct, and terms of use, please click the applicable link below or see https://www.lfprojects.org.


The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Policy page.