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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions REGRESSION/resources/config-local.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,50 @@
<delayBetweenScenarioRuns seconds="1" enabled="false"/>

<runScenariosByTag enabled="true">
<tag name="web" enabled="true"/>
<tag name="web" enabled="false"/>
<tag name="mobilebrowser" enabled="false"/>
<tag name="mobilebrowser-healthcheck" enabled="false"/>
<tag name="native" enabled="false"/>
<tag name="native-healthcheck" enabled="false"/>
<tag name="condition-mixed" enabled="true"/>
<tag name="condition-self" enabled="true"/>
<tag name="condition-mixed" enabled="false"/>
<tag name="condition-self" enabled="false"/>

<tag name="shell-self" enabled="false"/>
<tag name="shell-mixed" enabled="false"/>

<tag name="assert-self" enabled="true"/>
<tag name="assert-self" enabled="false"/>

<tag name="var-mixed" enabled="true"/>
<tag name="var-self" enabled="true"/>
<tag name="var-mixed" enabled="false"/>
<tag name="var-self" enabled="false"/>

<tag name="variations-mixed" enabled="true"/>
<tag name="variations-self" enabled="true"/>
<tag name="variations-mixed" enabled="false"/>
<tag name="variations-self" enabled="false"/>

<tag name="auth-basic-mixed" enabled="true"/>
<tag name="auth-jwt-mixed" enabled="true"/>
<tag name="auth-basic-mixed" enabled="false"/>
<tag name="auth-jwt-mixed" enabled="false"/>

<tag name="elasticsearch-mixed" enabled="true"/>
<tag name="elasticsearch-self" enabled="true"/>
<tag name="elasticsearch-mixed" enabled="false"/>
<tag name="elasticsearch-self" enabled="false"/>

<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"/>
<tag name="api" enabled="false"/>
<tag name="websocket" enabled="false"/>
<tag name="graphql" enabled="false"/>
<tag name="lambda" enabled="true"/>
<tag name="mysql" enabled="false"/>
<tag name="postgresql" enabled="false"/>
<tag name="clickhouse" enabled="false"/>
<tag name="oracle" enabled="false"/>
<tag name="mongodb" enabled="true"/>
<tag name="dynamodb" enabled="true"/>
<tag name="kafka" enabled="true"/>
<tag name="rabbit" enabled="true"/>
<tag name="sqs" enabled="true"/>
<tag name="redis" enabled="true"/>
<tag name="mongodb" enabled="false"/>
<tag name="dynamodb" enabled="false"/>
<tag name="kafka" enabled="false"/>
<tag name="rabbit" enabled="false"/>
<tag name="sqs" enabled="false"/>
<tag name="redis" enabled="false"/>
<tag name="s3" enabled="true"/>
<tag name="sendgrid" enabled="false"/>
<tag name="twilio" enabled="false"/>
<tag name="smtp" enabled="false"/>
<tag name="ses" enabled="true"/>
<tag name="ses" enabled="false"/>
</runScenariosByTag>

<report>
Expand All @@ -66,9 +66,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
3 changes: 3 additions & 0 deletions REGRESSION/resources/data/variations/variations_lambda.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
average,name,subject,marks,header,headerValue,expected
50,Bob,Physics,"50,50,50,50",X-Amz-Executed-Version,$LATEST,expected_1
50,John,Physics,"70,60,60,50",X-Amz-Executed-Version,$LATEST,expected_2
3 changes: 3 additions & 0 deletions REGRESSION/resources/data/variations/variations_s3.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
variable_bucket,variable_file,variable_expected,content_expected
testlum-var-bucket-1,upload_1.json,1,{"Testlum": "TOP"}
testlum-var-bucket-2,upload_2.json,2,{"Testlum": "The Best"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Alice",
"subject": "Mathematics",
"scores": [90, 85, 92, 88]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"student": "Alice",
"subject": "Mathematics",
"scores": [90, 85, 92, 88],
"average": 88.75,
"passed": true,
"status": "PASSED"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"student": "Bob",
"subject": "Physics",
"scores": [40, 55, 50, 45],
"average": 47.5,
"passed": false,
"status": "FAILED"
}
53 changes: 53 additions & 0 deletions REGRESSION/resources/scenarios/http/lambda/condition/scenario.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<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>Self test for student-scores-python: student score processor - calculates average, pass/fail status
</description>
<name>AWS Lambda Self scenario</name>
</overview>

<settings truncateStorages="true">
<tags>lambda</tags>
</settings>

<condition comment="Condition that evaluates to TRUE"
name="trueExecution"
spel="1 == 1"/>

<lambda comment="Should invoke student-scores-python with passing student scores - average 88.75"
alias="LAMBDA"
condition="trueExecution"
functionName="student-scores-python">
<body>
<from file="body_1.json"/>
</body>
<response file="expected_1.json">
<header name="X-Amz-Executed-Version" data="$LATEST"/>
</response>
</lambda>

<condition comment="Condition that evaluates to FALSE from the body of previous call"
name="falseExecution"
spel="1 == 2"/>

<lambda comment="Should skip invoke student-scores-python with failing student scores - average 47.5"
alias="LAMBDA"
condition="falseExecution"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

condition doesn't check anything
should be step with error inside

functionName="student-scores-python">
<body>
<raw>
{
"name": "Bob",
"subject": "Physics",
"scores": [40, 55, 50, 45]
}
</raw>
</body>
<response file="expected_2.json">
<header name="X-Amz-Executed-Version" data="$LATEST"/>
</response>
</lambda>

</scenario>
31 changes: 31 additions & 0 deletions REGRESSION/resources/scenarios/http/lambda/e2e/expected_7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[ {
"id" : "1",
"author" : "J. K. Rowling",
"title" : "Harry Potter and Philosopher's Stone",
"number" : 1
}, {
"id" : "2",
"author" : "J. R. R. Tolkien",
"title" : "The Lord of the Rings: The Fellowship of the Ring",
"number" : 2
}, {
"id" : "3",
"author" : "George R. R. Martin",
"title" : "A Game of Thrones",
"number" : 3
}, {
"id" : "4",
"author" : "Fredrik Backman",
"title" : "A Man Called Ove",
"number" : 4
}, {
"id" : "5",
"author" : "Ivan Franko",
"title" : "Kamenyari",
"number" : 5
}, {
"id" : "6",
"author" : "Taras Shevchenko",
"title" : "Kobzar",
"number" : 6
} ]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change tag to end2end

File renamed without changes.
31 changes: 0 additions & 31 deletions REGRESSION/resources/scenarios/http/lambda/expected_6.json

This file was deleted.

5 changes: 5 additions & 0 deletions REGRESSION/resources/scenarios/http/lambda/repeat/body_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Alice",
"subject": "Mathematics",
"scores": [90, 85, 92, 88]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"student": "Alice",
"subject": "Mathematics",
"scores": [90, 85, 92, 88],
"average": 88.75,
"passed": true,
"status": "PASSED"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"student": "Bob",
"subject": "Physics",
"scores": [40, 55, 50, 45],
"average": 47.5,
"passed": false,
"status": "FAILED"
}
28 changes: 28 additions & 0 deletions REGRESSION/resources/scenarios/http/lambda/repeat/scenario.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<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>Repeat test for student-scores-python lambda: student score processor - calculates average, pass/fail status
</description>
<name>AWS Lambda Repeat scenario</name>
</overview>

<settings truncateStorages="true">
<tags>lambda</tags>
</settings>

<repeat comment="Invoke lambda function with repeat command N times" times="5">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeat with variations

<lambda comment="Invoke student-scores-python with passing student scores - average 88.75"
alias="LAMBDA"
functionName="student-scores-python">
<body>
<from file="body_1.json"/>
</body>
<response file="expected_1.json">
<header name="X-Amz-Executed-Version" data="$LATEST"/>
</response>
</lambda>
</repeat>

</scenario>
5 changes: 5 additions & 0 deletions REGRESSION/resources/scenarios/http/lambda/self/body_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Alice",
"subject": "Mathematics",
"scores": [90, 85, 92, 88]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"student": "Alice",
"subject": "Mathematics",
"scores": [90, 85, 92, 88],
"average": 88.75,
"passed": true,
"status": "PASSED"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"student": "Bob",
"subject": "Physics",
"scores": [40, 55, 50, 45],
"average": 47.5,
"passed": false,
"status": "FAILED"
}
43 changes: 43 additions & 0 deletions REGRESSION/resources/scenarios/http/lambda/self/scenario.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<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>Self test for student-scores-python lambda: student score processor - calculates average,pass/fail status
</description>
<name>AWS Lambda Self scenario</name>
</overview>

<settings truncateStorages="true">
<tags>lambda</tags>
</settings>

<lambda comment="Invoke student-scores-python with passing student scores - average 88.75"
alias="LAMBDA"
functionName="student-scores-python">
<body>
<from file="body_1.json"/>
</body>
<response file="expected_1.json">
<header name="X-Amz-Executed-Version" data="$LATEST"/>
</response>
</lambda>

<lambda comment="Invoke student-scores-python with failing student scores - average 47.5"
alias="LAMBDA"
functionName="student-scores-python">
<body>
<raw>
{
"name": "Bob",
"subject": "Physics",
"scores": [40, 55, 50, 45]
}
</raw>
</body>
<response file="expected_2.json">
<header name="X-Amz-Executed-Version" data="$LATEST"/>
</response>
</lambda>

</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inject here

"student" : "Bob",
"subject" : "Physics",
"scores" : [ 50, 50, 50, 50 ],
"average" : 50.0,
"passed" : false,
"status" : "FAILED"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"student" : "John",
"subject" : "Physics",
"scores" : [ 70, 60, 60, 50 ],
"average" : 60.0,
"passed" : true,
"status" : "PASSED"
}
Loading