Package fr.gouv.vitam.ihmrecette.appserver.applicativetest

# Class ApplicativeTestResource

java.lang.Object
fr.gouv.vitam.ihmrecette.appserver.applicativetest.ApplicativeTestResource

@Path("/v1/api/applicative-test") public class ApplicativeTestResource extends Object
resource to manage system test

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ApplicativeTestResource(ApplicativeTestService applicativeTestService, String testSystemSipDirectory)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `jakarta.ws.rs.core.Response`
  `launchCucumberPiecesTest(String pieces)`
  launch cucumber test
  `jakarta.ws.rs.core.Response`
  `launchCucumberTest()`
  launch cucumber test
  `jakarta.ws.rs.core.Response`
  `listGitBranches()`
  list git branches
  `jakarta.ws.rs.core.Response`
  `listReports()`
  list the report of system test
  `jakarta.ws.rs.core.Response`
  `reportByName(String fileName)`
  PDL return a specific report according to his name.
  `jakarta.ws.rs.core.Response`
  `status()`
  get status of the test
  `jakarta.ws.rs.core.Response`
  `synchronizedPiecesTestDirectoryWithBranch(String branch)`
  synchronize git branch
  `jakarta.ws.rs.core.Response`
  `synchronizedTestDirectory()`
  synchronize tnr directory

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ApplicativeTestResource

    public ApplicativeTestResource(ApplicativeTestService applicativeTestService, String testSystemSipDirectory)
    Parameters:
      `applicativeTestService` - service
      `testSystemSipDirectory` - base path on feature

- ## Method Details

  - ### launchCucumberTest

    @POST @Produces("application/json") public jakarta.ws.rs.core.Response launchCucumberTest()
    launch cucumber test
    Returns:
      202 if test are in progress, 200 if the previous test are done

  - ### launchCucumberPiecesTest

    @POST @Path("/testFeature") @Produces("application/json") public jakarta.ws.rs.core.Response launchCucumberPiecesTest(String pieces)
    launch cucumber test
    Returns:
      200 if the previous test are done

  - ### status

    @HEAD public jakarta.ws.rs.core.Response status()
    get status of the test
    Returns:
      202 if test are in progress, 200 if the previous test are done

  - ### listReports

    @GET @Produces("application/json") public jakarta.ws.rs.core.Response listReports() throws IOException
    list the report of system test
    Returns:
      list of report
    Throws:
      `IOException`

  - ### listGitBranches

    @GET @Path("/gitBranches") @Produces("application/json") public jakarta.ws.rs.core.Response listGitBranches() throws IOException, InterruptedException
    list git branches
    Returns:
      list of git branches
    Throws:
      `IOException`
      `InterruptedException`

  - ### reportByName

    @GET @Path("/{report}") @Produces("application/octet-stream") public jakarta.ws.rs.core.Response reportByName(@PathParam("report") String fileName)
    PDL return a specific report according to his name.
    Parameters:
      `fileName` - name of the report
    Returns:
      200 if report is ok, 404 if exception occurs

  - ### synchronizedPiecesTestDirectoryWithBranch

    @POST @Path("/syncTnrPiecesWithBranch") @Produces("application/json") public jakarta.ws.rs.core.Response synchronizedPiecesTestDirectoryWithBranch(String branch) throws IOException, InterruptedException
    synchronize git branch
    Returns:
      Status of the command
    Throws:
      `IOException`
      `InterruptedException`

  - ### synchronizedTestDirectory

    @POST @Path("/sync") public jakarta.ws.rs.core.Response synchronizedTestDirectory() throws IOException, InterruptedException
    synchronize tnr directory
    Returns:
      status of the command
    Throws:
      `IOException`
      `InterruptedException`