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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contactEmail,userEmail,subject,messageText,type
contact@testlum.com,test1@gmail.com,Hello 1,Message 1,text/plain
contact@testlum.com,test2@gmail.com,Hello 2,Message 2,text/plain
contact@testlum.com,test3@gmail.com,Hello 3,Message 3,text/plain
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
requestComment,contactEmail,userEmail,subject,messageText,type
Send first email via CSV variation,contact@testlum.com,test1@gmail.com,Hello 1,Message 1,text/plain
Send second email via CSV variation,contact@testlum.com,test2@gmail.com,Hello 2,Message 2,text/plain
4 changes: 4 additions & 0 deletions REGRESSION/resources/data/variations/ses/ses_repeat.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
destinationEmail,subjectText,textBody
test1@gmail.com,Sub 1,Msg 1
test2@gmail.com,Sub 2,Msg 2
test3@gmail.com,Sub 3,Msg 3
4 changes: 4 additions & 0 deletions REGRESSION/resources/data/variations/ses/ses_variations.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
comment,destinationEmail,sourceEmail,subjectText,textBody
Send first SES email from CSV,test1@gmail.com,testlum@gmail.com,Hello 1,Message 1
Send second SES email from CSV,test2@gmail.com,testlum@gmail.com,Hello 2,Message 2
Send third SES email from CSV,test3@gmail.com,testlum@gmail.com,Hello 3,Message 3
4 changes: 4 additions & 0 deletions REGRESSION/resources/data/variations/smtp/smtp_repeat.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
recipient,subjectText,messageText
test1@gmail.com,Sub 1,Msg 1
test2@gmail.com,Sub 2,Msg 2
test3@gmail.com,Sub 3,Msg 3
4 changes: 4 additions & 0 deletions REGRESSION/resources/data/variations/smtp/smtp_variations.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
comment,recipient,subjectText,messageText
Send first email from CSV,test1@gmail.com,Hello 1,Message 1
Send second email from CSV,test2@gmail.com,Hello 2,Message 2
Send third email from CSV,test3@gmail.com,Hello 3,Message 3
4 changes: 4 additions & 0 deletions REGRESSION/resources/data/variations/twilio/twilio_repeat.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
phoneNumber,messageText
+380500387639,Hello A
+380500387639,Hello B
+380500387639,Hello C
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
comment,phoneNumber,messageText
Send first message,+380500387639,Hello 1
Send second message,+380500387639,Hello 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"from": {
"email": "contact@testlum.com"
},
"subject": "File Body Test",
"personalizations": [
{
"to": [
{
"email": "testlum.test.acc@gmail.com"
}
]
}
],
"content": [
{
"type": "text/plain",
"value": "Message from file body"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<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>
<name>SendGrid Body File Test</name>
<description>
This scenario verifies SendGrid request execution using file-based body.

Test flow:
1. Load request body from external JSON file.
2. Send email using file content.
3. Verify response status = 202.

This scenario validates:
- File-based body loading
- JSON parsing from file
- Correct request execution
</description>
</overview>

<settings>
<tags>sendgrid</tags>
</settings>

<sendgrid comment="Send email using file body"
alias="SG_0">

<post endpoint="/mail/send">
<response code="202"/>
<body>
<from file="request_1.json"/>
</body>

</post>

</sendgrid>

</scenario>
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>
<name>SendGrid Body Raw Test</name>
<description>
This scenario verifies SendGrid request execution using raw body.

Test flow:
1. Send email using inline JSON body (raw).
2. Verify response status = 202.

This scenario validates:
- Raw body parsing
- Correct JSON structure handling
- Successful request execution
</description>
</overview>

<settings>
<tags>sendgrid</tags>
</settings>

<sendgrid comment="Send email using raw body"
alias="SG_0">

<post endpoint="/mail/send">
<response code="202"/>

<body>
<raw>
{
"from": { "email": "contact@testlum.com" },
"subject": "Raw Body Test",
"personalizations": [{
"to": [{
"email": "testlum.test.acc@gmail.com"
}]
}],
"content": [{
"type": "text/plain",
"value": "Message from raw body"
}]
}
</raw>
</body>

</post>

</sendgrid>

</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<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>
<name>SendGrid Condition Execution Control Test</name>
<description>
This scenario verifies condition-based execution control for SendGrid requests.

Test flow:
1. Execute request with TRUE condition → request should be sent and return 202.
2. Execute request with FALSE condition → request should NOT be executed.

Additional validation:
- Second request contains invalid payload to ensure failure if condition is ignored.
</description>
</overview>

<settings>
<tags>sendgrid</tags>
</settings>

<condition comment="Condition that allows request execution"
name="executeRequest"
spel="true"/>

<condition comment="Condition that blocks request execution"
name="skipRequest"
spel="false"/>


<sendgrid comment="Request should be executed because condition is TRUE"
alias="SG_0"
condition="executeRequest">

<post endpoint="/mail/send">
<response code="202"/>

<body>
<raw>
{
"from": { "email": "contact@testlum.com" },
"subject": "Condition TRUE - request executed",
"personalizations": [{
"to": [{
"email": "konnor999@gmail.com"
}]
}],
"content": [{
"type": "text/plain",
"value": "This request must be executed"
}]
}
</raw>
</body>
</post>

</sendgrid>

<sendgrid comment="Request should NOT be executed because condition is FALSE"
alias="SG_0"
condition="skipRequest">

<post endpoint="/mail/send">
<response code="200"/>
<body>
<raw>
{
"from": { "email": "INVALID_EMAIL" },
"subject": "Condition FALSE - request must be skipped",
"personalizations": [{
"to": [{
"email": "testlum.test.acc@gmail.com"
}]
}],
"content": [{
"type": "text/plain",
"value": "This request must NOT be executed"
}]
}
</raw>
</body>
</post>

</sendgrid>

</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<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>
<name>SendGrid Repeat Times</name>
<description>
This scenario verifies SendGrid execution inside repeat block using times.

Test flow:
1. Execute SendGrid request inside repeat block 3 times.
2. Send the same email on each iteration.
3. Verify response status = 202 for each execution.

This scenario validates:
- Stable repeated execution
- Correct handling of multiple identical requests
</description>
</overview>

<settings>
<tags>sendgrid</tags>
</settings>

<repeat comment="Execute SendGrid request 3 times"
times="3">

<sendgrid comment="Send email inside repeat-times block"
alias="SG_0">

<post endpoint="/mail/send">
<response code="202"/>

<body>
<raw>
{
"from": { "email": "contact@testlum.com" },
"subject": "Repeat Times Test",
"personalizations": [{
"to": [{
"email": "testlum.test.acc@gmail.com"
}]
}],
"content": [{
"type": "text/plain",
"value": "Repeated message"
}]
}
</raw>
</body>

</post>

</sendgrid>

</repeat>

</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<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>
<name>SendGrid Repeat Variations</name>
<description>
This scenario verifies SendGrid execution inside repeat block using variations.

Test flow:
1. Execute SendGrid request for each CSV row.
2. Send email with different payload per iteration.
3. Verify response code dynamically.

This scenario validates:
- CSV-driven execution
- Variable interpolation inside repeat
- Positive and negative scenarios
</description>
</overview>

<settings>
<tags>sendgrid</tags>
</settings>

<repeat comment="Execute SendGrid request using variation rows"
variations="sendgridRepeatVariations.csv">

<sendgrid comment="Send email from variation row"
alias="SG_0">

<post endpoint="/mail/send">
<response code="202"/>

<body>
<raw>
{
"from": { "email": "{{contactEmail}}" },
"subject": "{{subject}}",
"personalizations": [{
"to": [{
"email": "{{userEmail}}"
}]
}],
"content": [{
"type": "{{type}}",
"value": "{{messageText}}"
}]
}
</raw>
</body>

</post>

</sendgrid>

</repeat>

</scenario>
Loading