Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions REGRESSION/resources/config-ci-regression-mobile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<delayBetweenScenarioRuns seconds="1" enabled="true"/>

<runScenariosByTag enabled="true">
<tag name="auth" enabled="true"/>
<tag name="http" enabled="true"/>
<tag name="websocket" enabled="true"/>
<tag name="graphql" enabled="true"/>

<tag name="web" enabled="false"/>
<tag name="mobilebrowser" enabled="false"/>
<tag name="mobilebrowser-healthcheck" enabled="true"/>
Expand All @@ -27,8 +32,6 @@
<tag name="elasticsearch-mixed" enabled="false"/>
<tag name="elasticsearch-self" enabled="false"/>
<tag name="api" enabled="false"/>
<tag name="websocket" enabled="false"/>
<tag name="graphql" enabled="false"/>
<tag name="lambda" enabled="false"/>
<tag name="mysql" enabled="false"/>
<tag name="postgresql" enabled="false"/>
Expand Down
7 changes: 5 additions & 2 deletions REGRESSION/resources/config-ci-regression-windows.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<delayBetweenScenarioRuns seconds="1" enabled="true"/>

<runScenariosByTag enabled="true">
<tag name="auth" enabled="true"/>
<tag name="http" enabled="true"/>
<tag name="websocket" enabled="true"/>
<tag name="graphql" enabled="true"/>

<tag name="web" enabled="false"/>
<tag name="mobilebrowser" enabled="false"/>
<tag name="mobilebrowser-healthcheck" enabled="false"/>
Expand All @@ -27,8 +32,6 @@
<tag name="elasticsearch-mixed" enabled="false"/>
<tag name="elasticsearch-self" enabled="false"/>
<tag name="api" enabled="false"/>
<tag name="websocket" enabled="false"/>
<tag name="graphql" enabled="false"/>
<tag name="lambda" enabled="false"/>
<tag name="mysql" enabled="false"/>
<tag name="postgresql" enabled="false"/>
Expand Down
7 changes: 5 additions & 2 deletions REGRESSION/resources/config-ci-regression.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<delayBetweenScenarioRuns seconds="1" enabled="true"/>

<runScenariosByTag enabled="true">
<tag name="auth" enabled="true"/>
<tag name="http" enabled="true"/>
<tag name="websocket" enabled="true"/>
<tag name="graphql" enabled="true"/>

<tag name="web" enabled="true"/>
<tag name="mobilebrowser" enabled="false"/>
<tag name="mobilebrowser-healthcheck" enabled="false"/>
Expand All @@ -27,8 +32,6 @@
<tag name="elasticsearch-mixed" enabled="true"/>
<tag name="elasticsearch-self" enabled="true"/>
<tag name="api" enabled="true"/>
<tag name="websocket" enabled="true"/>
<tag name="graphql" enabled="true"/>
<tag name="lambda" enabled="true"/>
<tag name="mysql" enabled="true"/>
<tag name="postgresql" enabled="true"/>
Expand Down
11 changes: 7 additions & 4 deletions REGRESSION/resources/config-local.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<delayBetweenScenarioRuns seconds="1" enabled="false"/>

<runScenariosByTag enabled="true">
<tag name="auth" enabled="true"/>
<tag name="http" enabled="true"/>
<tag name="websocket" enabled="true"/>
<tag name="graphql" enabled="true"/>

<tag name="web" enabled="true"/>
<tag name="mobilebrowser" enabled="false"/>
<tag name="mobilebrowser-healthcheck" enabled="false"/>
Expand All @@ -34,8 +39,6 @@
<tag name="elasticsearch-self" enabled="true"/>

<tag name="api" enabled="true"/>
<tag name="websocket" enabled="true"/>
<tag name="graphql" enabled="true"/>
<tag name="lambda" enabled="false"/>
<tag name="mysql" enabled="true"/>
<tag name="postgresql" enabled="true"/>
Expand Down Expand Up @@ -66,9 +69,9 @@

<environments>
<!-- No need to launch vault to use this env -->
<env folder="static" enabled="false" threads="1"/>
<env folder="static" enabled="true" threads="1"/>
<!-- Vault is must have to use this env -->
<env folder="vault" enabled="true" threads="1"/>
<env folder="vault" enabled="false" threads="1"/>
</environments>

<vault>
Expand Down
17 changes: 17 additions & 0 deletions REGRESSION/resources/config/ci-windows/integration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,32 @@
<api alias="MEGA_APP" url="http://mega-test-api:8080/api/v1" enabled="false">
<auth authStrategy="jwt"/>
</api>
<api alias="MEGA_APP_NO_LOGOUT" url="http://mega-test-api:8080/api/v1" enabled="true">
<auth authStrategy="jwt" autoLogout="false"/>
</api>
<api alias="MEGA_APP_BASIC" url="http://mega-test-api:8080/api/v1" enabled="false">
<auth authStrategy="basic"/>
</api>
<api alias="MEGA_APP_BASIC_NO_LOGOUT" url="http://mega-test-api:8080/api/v1" enabled="true">
<auth authStrategy="basic" autoLogout="false"/>
</api>
<api alias="MEGA_APP_CUSTOM" url="http://mega-test-api:8080/api/v1" enabled="true">
<auth authStrategy="custom"
authCustomClassName="com.knubisoft.testlum.testing.framework.auth.CustomAuth"
autoLogout="true"/>
</api>
<api alias="MEGA_APP_CUSTOM_NO_LOGOUT" url="http://mega-test-api:8080/api/v1" enabled="true">
<auth authStrategy="custom"
authCustomClassName="com.knubisoft.testlum.testing.framework.auth.CustomAuth"
autoLogout="false"/>
</api>
<api alias="CAT_FACTS" url="https://catfact.ninja/" enabled="false"/>
<api alias="MULTIPART" url="https://postman-echo.com" enabled="false"/>
</apis>

<websockets>
<api alias="MEGA_WS_APP" url="ws://mega-test-api:8080/api/v1/ws-app" protocol="stomp" enabled="false"/>
<api alias="MEGA_WS_STANDARD" enabled="true" url="ws://mega-test-api:8080/api/v1/ws-standard" protocol="standard"/>
<api alias="ECHO" url="wss://ws.postman-echo.com/raw" protocol="standard" enabled="false"/>
</websockets>

Expand Down
17 changes: 17 additions & 0 deletions REGRESSION/resources/config/ci/integration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,32 @@
<api alias="MEGA_APP" url="http://mega-test-api:8080/api/v1" enabled="true">
<auth authStrategy="jwt"/>
</api>
<api alias="MEGA_APP_NO_LOGOUT" url="http://mega-test-api:8080/api/v1" enabled="true">
<auth authStrategy="jwt" autoLogout="false"/>
</api>
<api alias="MEGA_APP_BASIC" url="http://mega-test-api:8080/api/v1" enabled="true">
<auth authStrategy="basic"/>
</api>
<api alias="MEGA_APP_BASIC_NO_LOGOUT" url="http://mega-test-api:8080/api/v1" enabled="true">
<auth authStrategy="basic" autoLogout="false"/>
</api>
<api alias="MEGA_APP_CUSTOM" url="http://mega-test-api:8080/api/v1" enabled="true">
<auth authStrategy="custom"
authCustomClassName="com.knubisoft.testlum.testing.framework.auth.CustomAuth"
autoLogout="true"/>
</api>
<api alias="MEGA_APP_CUSTOM_NO_LOGOUT" url="http://mega-test-api:8080/api/v1" enabled="true">
<auth authStrategy="custom"
authCustomClassName="com.knubisoft.testlum.testing.framework.auth.CustomAuth"
autoLogout="false"/>
</api>
<api alias="CAT_FACTS" url="https://catfact.ninja/" enabled="true"/>
<api alias="MULTIPART" url="https://postman-echo.com" enabled="true"/>
</apis>

<websockets>
<api alias="MEGA_WS_APP" url="ws://mega-test-api:8080/api/v1/ws-app" protocol="stomp" enabled="true"/>
<api alias="MEGA_WS_STANDARD" enabled="true" url="ws://mega-test-api:8080/api/v1/ws-standard" protocol="standard"/>
<api alias="ECHO" url="wss://ws.postman-echo.com/raw" protocol="standard" enabled="true"/>
</websockets>

Expand Down
19 changes: 18 additions & 1 deletion REGRESSION/resources/config/local/static/integration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,31 @@
<api alias="MEGA_APP" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="jwt"/>
</api>
<api alias="MEGA_APP_NO_LOGOUT" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="jwt" autoLogout="false"/>
</api>
<api alias="MEGA_APP_BASIC" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="basic"/>
</api>
<api alias="CAT_FACTS" url="https://catfact.ninja/" enabled="true"/>
<api alias="MEGA_APP_BASIC_NO_LOGOUT" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="basic" autoLogout="false"/>
</api>
<api alias="MEGA_APP_CUSTOM" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="custom"
authCustomClassName="com.knubisoft.testlum.testing.framework.auth.CustomAuth"
autoLogout="true"/>
</api>
<api alias="MEGA_APP_CUSTOM_NO_LOGOUT" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="custom"
authCustomClassName="com.knubisoft.testlum.testing.framework.auth.CustomAuth"
autoLogout="false"/>
</api>
<api alias="MULTIPART" url="https://postman-echo.com" enabled="true"/>
<api alias="CAT_FACTS" url="https://catfact.ninja/" enabled="true"/>
</apis>

<websockets>
<api alias="MEGA_WS_STANDARD" enabled="true" url="ws://localhost:8080/api/v1/ws-standard" protocol="standard"/>
<api alias="MEGA_WS_APP" url="ws://localhost:8080/api/v1/ws-app" protocol="stomp" enabled="true"/>
<api alias="ECHO" url="wss://ws.postman-echo.com/raw" protocol="standard" enabled="true"/>
</websockets>
Expand Down
17 changes: 17 additions & 0 deletions REGRESSION/resources/config/local/vault/integration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,31 @@
<api alias="MEGA_APP" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="jwt"/>
</api>
<api alias="MEGA_APP_NO_LOGOUT" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="jwt" autoLogout="false"/>
</api>
<api alias="MEGA_APP_BASIC" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="basic"/>
</api>
<api alias="MEGA_APP_BASIC_NO_LOGOUT" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="basic" autoLogout="false"/>
</api>
<api alias="MEGA_APP_CUSTOM" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="custom"
authCustomClassName="com.knubisoft.testlum.testing.framework.auth.CustomAuth"
autoLogout="true"/>
</api>
<api alias="MEGA_APP_CUSTOM_NO_LOGOUT" url="http://localhost:8080/api/v1" enabled="true">
<auth authStrategy="custom"
authCustomClassName="com.knubisoft.testlum.testing.framework.auth.CustomAuth"
autoLogout="false"/>
</api>
<api alias="CAT_FACTS" url="https://catfact.ninja/" enabled="true"/>
<api alias="MULTIPART" url="https://postman-echo.com" enabled="true"/>
</apis>

<websockets>
<api alias="MEGA_WS_STANDARD" enabled="true" url="ws://localhost:8080/api/v1/ws-standard" protocol="standard"/>
<api alias="MEGA_WS_APP" url="ws://localhost:8080/api/v1/ws-app" protocol="stomp" enabled="true"/>
<api alias="ECHO" url="wss://ws.postman-echo.com/raw" protocol="standard" enabled="true"/>
</websockets>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"username": "testlum",
"password": "123456"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"clientId": "testlum-client",
"clientSecret": "super-secret"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"username": "testlum",
"password": "123456"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"username": "username",
"password": "password"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
value
repeat-resource-1
repeat-resource-2
repeat-resource-3
3 changes: 3 additions & 0 deletions REGRESSION/resources/data/variations/auth/authVariations.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
authComment,authLoginEndpoint,httpComment,httpEndpoint,expected_2,value
Authenticate first JWT variation,api/test/auth/jwt/login,Create first protected variation resource,api/test/auth/jwt/resource,expected_2_1,repeat-resource-1
Authenticate second JWT variation,api/test/auth/jwt/login,Create second protected variation resource,api/test/auth/jwt/resource,expected_2_2,repeat-resource-2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title,author,number,expected_1
Repeat Book 1,Vadym,1,expected_2_1
Repeat Book 2,Taras,2,expected_2_2
Repeat Book 3,Knubisoft,3,expected_2_3
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title,author,number,expected_file
Repeat Book One,Vadym,1,expected_2
Repeat Book Two,Taras,2,expected_3
Repeat Book Three,Knubisoft,3,expected_4
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
comment,title,author,number,expected_1
Step 1-4. Create first GraphQL book using first variation row,Variation Book One,Vadym,1,expected_1_1
Step 1-4. Create second GraphQL book using second variation row,Variation Book Two,Taras,2,expected_1_2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name,description,status,category
Repeat Variation One,Created from first repeat variation,NEW,REPEAT_ONE
Repeat Variation Two,Created from second repeat variation,ACTIVE,REPEAT_TWO
Repeat Variation Three,Created from third repeat variation,ARCHIVED,REPEAT_THREE
3 changes: 3 additions & 0 deletions REGRESSION/resources/data/variations/http/httpVariations.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
comment,endpoint,name,description,status,category,expected_1
Step 1-4. Create first entity using first variation row,api/test/entities,Variation Entity One,Created from first variation,NEW,VARIATION_ONE,expected_1_1
Step 1-4. Create second entity using second variation row,api/test/entities,Variation Entity Two,Created from second variation,ACTIVE,VARIATION_TWO,expected_1_2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
wsComment,sendComment,receiveComment,message,expected_2
WS variation 1,Send hello message,Receive hello echo,hello websocket,expected_2_1
WS variation 2,Send ping message,Receive ping echo,ping,expected_2_2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
comment,subscribeComment,sendComment,receiveComment,endpoint,topic,message,expected_2
STOMP variation 1,Subscribe to ping,Send ping,Receive ping,app/ping,topic/ping,hello stomp,expected_2_1
STOMP variation 2,Subscribe to ping,Send test,Receive test,app/ping,topic/ping,test message,expected_2_2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"status": "UNAUTHORIZED",
"message": "Missing Authorization header",
"timestamp": "p(any)"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"username": "testlum",
"role": "ADMIN"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ {
"username" : "testlum",
"role" : "ADMIN"
} ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<scenario xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.knubisoft.com/testlum/testing/model/scenario"
xsi:schemaLocation="http://www.knubisoft.com/testlum/testing/model/scenario scenario.xsd">

<overview>
<description>
This scenario verifies Basic Authentication behavior when autoLogout is disabled.

Test flow includes:
1. Send request without Authorization header → expect 401.
2. Apply Basic Auth via auth tag.
3. Send GET request → expect 200.
4. Create new user → expect 200.
5. Verify updated user list.
6. Exit auth block.
7. Send request again outside auth block → expect 200 because autoLogout=false.
8. Reset test data.

This scenario validates:
- Basic Auth header injection inside auth block
- Protected endpoint access with valid credentials
- Authorization header persistence after auth block
- Continued authorized access after leaving auth block when autoLogout is disabled
</description>
<name>Auth Basic AutoLogout Disabled</name>
<developer>Vadym Kostenko</developer>
</overview>

<settings>
<tags>auth</tags>
</settings>

<!-- move http-auth-user-basic.json to data/credentials/http/basic -->
<http comment="Unauthorized request should return 401 before auth"
alias="MEGA_APP_BASIC_NO_LOGOUT">
<get endpoint="/api/test/auth/basic/users">
<response code="401" file="expected_1.json"/>
</get>
</http>

<auth comment="Apply Basic Auth header"
apiAlias="MEGA_APP_BASIC_NO_LOGOUT"
credentials="http-auth-user-basic.json"
loginEndpoint="/ignore">

<http comment="Get users inside auth block"
alias="MEGA_APP_BASIC_NO_LOGOUT">
<get endpoint="/api/test/auth/basic/users">
<response code="200" file="expected_3.json"/>
</get>
</http>

</auth>

<http comment="Authorized request should still work after auth block because autoLogout is disabled"
alias="MEGA_APP_BASIC_NO_LOGOUT">
<get endpoint="/api/test/auth/basic/users">
<response code="200" file="expected_4.json"/>
</get>
</http>

<http comment="Reset basic auth test data"
alias="MEGA_APP_BASIC_NO_LOGOUT">
<delete endpoint="/api/test/auth/basic/reset">
<response code="200"/>
</delete>
</http>

</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"status": "UNAUTHORIZED",
"message": "Missing Authorization header",
"timestamp": "p(any)"
}
Loading