Test Setup Examples =================== Static org - Auth enrollment ---------------------------- This example shows how to define a WAFT test that will install WARP and enroll the node in the "AutoWARP" organization using auth token enrollment before the test begins. .. code-block:: python :linenos: import pytest import waft from waft import fixture @waft.mark.warp_zero_trust(organization='AutoWARP') def test_example(warp: fixture.warp): """This test definition serves as an example of how to define a test that will enroll the node in a static organization using token authentication""" # Test process will go here Static org - Email enrollment ----------------------------- This example shows how to define a WAFT test that will install WARP and enroll the node in the "AutoWARP" organization using email enrollment before the test begins. .. code-block:: python :linenos: import pytest import waft from waft import fixture @waft.mark.warp_zero_trust(organization='AutoWARP', enroll='identity') def test_example(warp: fixture.warp): """This test definition serves as an example of how to define a test that will enroll the node in a static organization using email authentication""" # Test process will go here Single Device Profile --------------------- This example shows how to define a WAFT test that only needs a single device profile to do testing (no actions are needed to be taken outside that single device profile). WARP will be installed and then the device will be enrolled using email (to specify device profile) in the org that is reserved for single device profile tests. .. code-block:: python :linenos: import pytest import waft from waft import fixture @waft.mark.warp_zero_trust() # This marker is still used since the test will be testing the zero trust product. def test_example(warp: fixture.warp, single_device_profile: fixture.single_device_profile): """This test definition serves as an example of how to define a test that will enroll the node in a static organization using email authentication""" # Test process will go here # Device profile created for test instance will be accessible through the single_device_profile fixture Dynamic Organization - Auth enrollment -------------------- This example shows how to define a WAFT test that will use a dynamic organization and enroll by Auth token. These are organizations that are maintained in a nominal state before being used for tests. .. code-block:: python :linenos: import pytest import waft from waft import fixture @waft.mark.warp_zero_trust(dynamic=True) def test_example(warp: fixture.warp, dashboard: fixture.dashboard): """This test definition serves as an example of how to define a test that will enroll the node in a static organization using token authentication""" # Test process will go here