diff --git a/pom.xml b/pom.xml index 924a736d526d..b45a54a74f8e 100644 --- a/pom.xml +++ b/pom.xml @@ -1,159 +1,214 @@ - - - 4.0.0 - com.thealgorithms - Java - 1.0-SNAPSHOT - jar - - - UTF-8 - 21 - 21 - 3.26.0 - - - - - - org.junit - junit-bom - 5.10.3 - pom - import - - - - + + + 4.0.0 + com.thealgorithms + Java + 1.0-SNAPSHOT + jar + + UTF-8 + 21 + 21 + 3.26.0 + + - - org.junit.jupiter - junit-jupiter - 5.10.3 - test - - - org.assertj - assertj-core - ${assertj.version} - test - - - - org.junit.jupiter - junit-jupiter-api - 5.10.3 - test - - - org.apache.commons - commons-lang3 - 3.14.0 - - - org.apache.commons - commons-collections4 - 4.5.0-M2 - + + org.junit + junit-bom + 5.10.3 + pom + import + + + io.karatelabs + karate-core + 1.5.1 + + + + io.karatelabs + karate-debugserver + 0.1.0 + + + + io.karatelabs + karate-junit5 + 1.5.1 + test + + + + io.spring.javaformat + spring-javaformat-formatter + 0.0.40 + + - - - - - maven-surefire-plugin - 3.3.0 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.13.0 - - 21 - 21 - - -Xlint:all - -Xlint:-auxiliaryclass - -Xlint:-rawtypes - -Xlint:-unchecked - -Xlint:-lossy-conversions - -Werror - - - - - org.jacoco - jacoco-maven-plugin - 0.8.12 - - - - prepare-agent - - - - generate-code-coverage-report - test - - report - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.4.0 - - checkstyle.xml - true - true - warning - - - - com.puppycrawl.tools - checkstyle - 10.17.0 - - - + + + + org.junit.jupiter + junit-jupiter + 5.10.3 + test + + + org.assertj + assertj-core + ${assertj.version} + test + + + org.junit.jupiter + junit-jupiter-api + 5.10.3 + test + + + org.apache.commons + commons-lang3 + 3.14.0 + + + org.apache.commons + commons-collections4 + 4.5.0-M2 + + + io.karatelabs + karate-core + 1.5.1 + + + + io.karatelabs + karate-debugserver + 0.1.0 + + + + io.karatelabs + karate-junit5 + 1.5.1 + test + + + + io.spring.javaformat + spring-javaformat-formatter + 0.0.40 + + + + + + + maven-surefire-plugin + 3.3.0 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + 21 + 21 + + -Xlint:all + -Xlint:-auxiliaryclass + -Xlint:-rawtypes + -Xlint:-unchecked + -Xlint:-lossy-conversions + -Werror + + + + + org.jacoco + jacoco-maven-plugin + 0.8.12 + + + + prepare-agent + + + + generate-code-coverage-report + test + + report + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.4.0 + + checkstyle.xml + true + true + warning + + + + com.puppycrawl.tools + checkstyle + 10.17.0 + + + + + com.github.spotbugs + spotbugs-maven-plugin + 4.8.6.1 + + spotbugs-exclude.xml + true + - com.github.spotbugs - spotbugs-maven-plugin - 4.8.6.1 - - spotbugs-exclude.xml - true - - - com.mebigfatguy.fb-contrib - fb-contrib - 7.6.4 - - - com.h3xstream.findsecbugs - findsecbugs-plugin - 1.13.0 - - - + com.mebigfatguy.fb-contrib + fb-contrib + 7.6.4 - org.apache.maven.plugins - maven-pmd-plugin - 3.23.0 - - true - true - false - pmd-exclude.properties - + com.h3xstream.findsecbugs + findsecbugs-plugin + 1.13.0 - - - + + + + + org.apache.maven.plugins + maven-pmd-plugin + 3.23.0 + + true + true + false + pmd-exclude.properties + + + + io.spring.javaformat + spring-javaformat-maven-plugin + 0.0.40 + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.2.5 + + + + + \ No newline at end of file diff --git a/src/test/java/com/thealgorithms/integration_tests/Location/TestAddLocation.feature b/src/test/java/com/thealgorithms/integration_tests/Location/TestAddLocation.feature new file mode 100644 index 000000000000..91fe3288dad4 --- /dev/null +++ b/src/test/java/com/thealgorithms/integration_tests/Location/TestAddLocation.feature @@ -0,0 +1,37 @@ +# ********RoostGPT******** + +# Test generated by RoostGPT for test certain-integration using AI Type Open AI and AI Model gpt-4 +# +# ROOST_METHOD_HASH=32e7aa68b7 +# ROOST_METHOD_SIG_HASH=3596873209 +# +# ########## Scenario ########## +# +# { +# feature: 'Feature: All API Test', +# background: null, +# rule: null, +# scenario: { +# title: 'Scenario: testAddLocation', +# steps: 'When the scenario executes\n' + +# 'Then the outcome should be "Success"\n' + +# 'And the details are:\n' + +# ' "Posting new location [UCLocation-HBER8FXU0J]"', +# examples: '' +# } +# } +# + +# ********RoostGPT******** +Feature: All API Test + + Background: + * url API_HOST_URL + * configure headers = { Authorization: #(karate.properties['AUTH_TOKEN']) } + + Scenario: Testing the addition of a new location + Given path 'UCLocation-HBER8FXU0J' + When method post + Then status 200 + And match response.status == 'Success' + And match response.details == 'Posting new location [UCLocation-HBER8FXU0J]' diff --git a/src/test/java/com/thealgorithms/integration_tests/Location/TestDeleteSession.feature b/src/test/java/com/thealgorithms/integration_tests/Location/TestDeleteSession.feature new file mode 100644 index 000000000000..c4a9986216f8 --- /dev/null +++ b/src/test/java/com/thealgorithms/integration_tests/Location/TestDeleteSession.feature @@ -0,0 +1,35 @@ +# ********RoostGPT******** + +# Test generated by RoostGPT for test certain-integration using AI Type Open AI and AI Model gpt-4 +# +# ROOST_METHOD_HASH=b77f105368 +# ROOST_METHOD_SIG_HASH=34456e7ede +# +# ########## Scenario ########## +# +# { +# feature: 'Feature: All API Test', +# background: null, +# rule: null, +# scenario: { +# title: 'Scenario: testDELETESession', +# steps: 'When the scenario executes\n' + +# 'Then the outcome should be "Success"\n' + +# 'And the details are:\n' + +# ' "Deleting session [R64EKX5RG32U]"', +# examples: '' +# } +# } +# + +# ********RoostGPT******** +Feature: All API Test + + Scenario: testDELETESession + * url 'API_HOST_URL' + Given path 'R64EKX5RG32U' + When method delete + Then status 200 + And match response == { message: '#string', status: 'Success' } + And match response.path == 'R64EKX5RG32U' + * print 'Deleting session [R64EKX5RG32U]' diff --git a/src/test/java/com/thealgorithms/integration_tests/Location/TestFetchNonExistentSession.feature b/src/test/java/com/thealgorithms/integration_tests/Location/TestFetchNonExistentSession.feature new file mode 100644 index 000000000000..d5a1ef1dfccd --- /dev/null +++ b/src/test/java/com/thealgorithms/integration_tests/Location/TestFetchNonExistentSession.feature @@ -0,0 +1,39 @@ +# ********RoostGPT******** + +# Test generated by RoostGPT for test certain-integration using AI Type Open AI and AI Model gpt-4 +# +# ROOST_METHOD_HASH=714c4daaf4 +# ROOST_METHOD_SIG_HASH=b2948c3472 +# +# ########## Scenario ########## +# +# { +# feature: 'Feature: All API Test', +# background: null, +# rule: null, +# scenario: { +# title: 'Scenario: testFetchNonExistentSession', +# steps: 'When the scenario executes\n' + +# 'Then the outcome should be "404 Not Found"\n' + +# 'And the details are:\n' + +# ' "Session with ID R64EKX5RG32U not found"', +# examples: '' +# } +# } +# + +# ********RoostGPT******** +Feature: All API Test + Description: This feature file includes all API tests + + Background: + * url API_HOST_URL + * configure headers = { Authorization: #(karate.properties['AUTH_TOKEN']) } + + Scenario: Fetch Non-Existent Session + Description: This scenario tests the fetch operation for a non-existent session + + Given path 'R64EKX5RG32U' + When method get + Then status 404 + And match response == { message: 'Session with ID R64EKX5RG32U not found' } diff --git a/src/test/java/com/thealgorithms/integration_tests/Location/TestGETSessionInstanceView.feature b/src/test/java/com/thealgorithms/integration_tests/Location/TestGETSessionInstanceView.feature new file mode 100644 index 000000000000..185dcddafae8 --- /dev/null +++ b/src/test/java/com/thealgorithms/integration_tests/Location/TestGETSessionInstanceView.feature @@ -0,0 +1,37 @@ +# ********RoostGPT******** + +# Test generated by RoostGPT for test certain-integration using AI Type Open AI and AI Model gpt-4 +# +# ROOST_METHOD_HASH=1e472e147b +# ROOST_METHOD_SIG_HASH=b33749b0e3 +# +# ########## Scenario ########## +# +# { +# feature: 'Feature: All API Test', +# background: null, +# rule: null, +# scenario: { +# title: 'Scenario: testGETSessionInstanceView', +# steps: 'When the scenario executes\n' + +# 'Then the outcome should be "Success"\n' + +# 'And the details are:\n' + +# ' "Retrieving session instance view for event [testsimplesession]"', +# examples: '' +# } +# } +# + +# ********RoostGPT******** +Feature: All API Test + + Scenario: testGETSessionInstanceView + * url API_HOST_URL + And path API_ENDPOINT_ROUTE + And configure headers = { Authorization: #(karate.properties['AUTH_TOKEN']) } + When method get + Then status 200 + And match response.path == 'API_ENDPOINT_ROUTE' + And match response == '#object' + # Retrieving session instance view for event [testsimplesession] + And match response.event == 'testsimplesession' diff --git a/src/test/java/com/thealgorithms/integration_tests/Location/TestGETSessionMultipleSearchFilters.feature b/src/test/java/com/thealgorithms/integration_tests/Location/TestGETSessionMultipleSearchFilters.feature new file mode 100644 index 000000000000..f6945fdb85ca --- /dev/null +++ b/src/test/java/com/thealgorithms/integration_tests/Location/TestGETSessionMultipleSearchFilters.feature @@ -0,0 +1,39 @@ +# ********RoostGPT******** + +# Test generated by RoostGPT for test certain-integration using AI Type Open AI and AI Model gpt-4 +# +# ROOST_METHOD_HASH=fded7848df +# ROOST_METHOD_SIG_HASH=111959890f +# +# ########## Scenario ########## +# +# { +# feature: 'Feature: All API Test', +# background: null, +# rule: null, +# scenario: { +# title: 'Scenario: testGETSessionWithMultipleSearchFilters', +# steps: 'When the scenario executes\n' + +# 'Then the outcome should be "404 Not Found"\n' + +# 'And the details are:\n' + +# ' "No sessions found matching criteria"', +# examples: '' +# } +# } +# + +# ********RoostGPT******** +Feature: All API Test + Description: This feature file includes all API tests. + + Background: + * url API_HOST_URL + * configure headers = { Authorization: #(karate.properties['AUTH_TOKEN']) } + + Scenario: Test GET Session With Multiple Search Filters + Description: This scenario tests the GET session with multiple search filters. + + Given path API_ENDPOINT_ROUTE + When method get + Then status 404 + And match response == { message: 'No sessions found matching criteria' } diff --git a/src/test/java/com/thealgorithms/integration_tests/Location/TestUpdateLocationCapacity.feature b/src/test/java/com/thealgorithms/integration_tests/Location/TestUpdateLocationCapacity.feature new file mode 100644 index 000000000000..98d4303489ed --- /dev/null +++ b/src/test/java/com/thealgorithms/integration_tests/Location/TestUpdateLocationCapacity.feature @@ -0,0 +1,41 @@ +# ********RoostGPT******** + +# Test generated by RoostGPT for test certain-integration using AI Type Open AI and AI Model gpt-4 +# +# ROOST_METHOD_HASH=50ec353220 +# ROOST_METHOD_SIG_HASH=22e1a8dc21 +# +# ########## Scenario ########## +# +# { +# feature: 'Feature: All API Test', +# background: null, +# rule: null, +# scenario: { +# title: 'Scenario: testUpdateLocationCapacity', +# steps: 'When the scenario executes\n' + +# 'Then the outcome should be "Success"\n' + +# 'And the details are:\n' + +# ' "Updating capacity for location UCLocation-HBER8FXU0J to 20"', +# examples: '' +# } +# } +# + +# ********RoostGPT******** +Feature: All API Test + Description: This feature file tests all the APIs + + Background: + * url 'API_HOST_URL' + * configure headers = { Authorization: '#(karate.properties['AUTH_TOKEN'])' } + + Scenario: Update Location Capacity + Description: This scenario tests the update location capacity API + + Given path 'UCLocation-HBER8FXU0J' + And request { capacity: 20 } + When method put + Then status 200 + And match response == { result: 'Success' } + And match response.details == 'Updating capacity for location UCLocation-HBER8FXU0J to 20'