Annotation Type IvyTest


  • @Retention(RUNTIME)
    @Target(TYPE)
    @ExtendWith(ch.ivyteam.ivy.server.internal.test.StartedEngineDeployAppJu5Ext.class) @ExtendWith(ch.ivyteam.ivy.environment.internal.IvyTestJu5Ext.class)
    public @interface IvyTest
    Provides JUNIT support for ivy environment variable

    Mark any Test source class with this annotation and start writing tests that uses ivy environment variable or public API that needs a ivy scope/context like IPersistenceContext.current(), IRestClientContext.current(), etc.

     @IvyTest
     public class MyTest{
       @Test
       public void log() throws Exception{
         Ivy.log().warn("This is a warning");     
       }
     }

    Use the AppFixture to temporary change the active environment or variables of the application in your tests

    Since:
    9.1
    See Also:
    Ivy, AppFixture, IvyProcessTest
    API:
    This is a public API.