Annotation Interface DataObjectDefinitionDeployment


Annotation that can be used to trigger a deployment of data object definitions for the provided test. If no resources() are provided, then an data object definition containing the name of the test class and method would be used to deploy. There are 2 use cases for this annotation:
  • Class level - The data object definitions will be deployed before every test, and they will be removed after every tests. In case TestInstance.Lifecycle#PER_CLASS is used, then the definitions will be deployed before all tests and removed after all tests.
  • Method level - The data object definitions will be deployed before the test and will be removed after the test
e.g.

 @DataObjectDefinitionDeployment
 class YourTest {

   @BeforeEach
   void setUp(DataObjectEngine dataObjectEngine) {
       ...
   }

   @Test
   @DataObjectDefinitionDeployment
   void myTest() {
       ...
   }

   ...
 }
 
Author:
Filip Hrisafov
  • Element Details

    • resources

      String[] resources
      Default:
      {}
    • tenantId

      String tenantId
      Default:
      ""