Interface SutHandler

  • All Known Implementing Classes:
    EmbeddedSutController, ExternalSutController, SutController

    public interface SutHandler
    Base interface used to control the system under test (SUT) from the generated tests. Needed base functionalities are for example, starting/stopping the SUT, and reset its state.
    • Method Detail

      • setupForGeneratedTest

        default void setupForGeneratedTest()
        There might be different settings based on when the SUT is run during the search of EvoMaster, and when it is later started in the generated tests.
      • startSut

        String startSut()
        Start a new instance of the SUT.
        This method must be blocking until the SUT is initialized.
        Returns:
        the base URL of the running SUT, eg "http://localhost:8080"
      • stopSut

        void stopSut()
        Stop the SUT
      • resetStateOfSUT

        void resetStateOfSUT()
        Make sure the SUT is in a clean state (eg, reset data in database). A possible (likely very inefficient) way to implement this would be to call #stopSUT followed by #startSUT
      • execInsertionsIntoDatabase

        void execInsertionsIntoDatabase​(List<InsertionDto> insertions)
        Execute the given data insertions into the database (if any)
        Parameters:
        insertions - DTOs for each insertion to execute