cmccarthyIrl / spring-cucumber-testng-parallel-test-harness

This project executes Cucumber tests sequentially or in parallel using TestNG, Spring, Cucumber, Java, Logback and Extent Reports to provide a basic test harness. Rest Assured and Selenium test examples are provided
MIT License
16 stars 6 forks source link

SpringBoot test as a service ? #7

Open SpringBootTestAsAService opened 1 year ago

SpringBootTestAsAService commented 1 year ago

Hi i can across your 'spring-cucumber-serenity-test-harness' project and find it very helpful in understanding what I am trying to achieve. I have recently started a role as an automation engineer.

What my developers want is to create end to end tests as a service. What I mean is write end to end api tests in cucumber bdd using serenity and restassured and write them as a service and deploy them as a webservice.

Tests will run when I will deploy this service and it will have a schedule which will also run the test.

As well as we can trigger the tests from Postman by hitting the 'POST' request.

I have already written a simple test and deployed it as a service. Now I want to convert this test into cucumber and serenity bdd so that there is feature file and serenity report

Is this doable you recon and is there any help/suggestion you can give me ?

cmccarthyIrl commented 10 months ago

Hi @SpringBootTestAsAService,

I'm glad you found my code useful. Yes, it's doable.

I would recommend creating a REST web service that allows you to make a POST request. Something like cmccarthyIrl/spring-karate-test-harness/ or Building REST services with Spring would work.

Once your web service is in place, I'd create an executable JAR file based on the Serenity or TestNG tests. The JAR file would read in the parameters/payload of your POST request.