Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
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 @@
{"Testlum": "TOP"}
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.

no condition for bucket command

Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<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>Condition bucket test: remove bucket only if condition is true, verify bucket still exists if condition is false</description>
<name>S3 Condition Bucket scenario</name>
</overview>

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

<s3 comment="Step 1 - create new bucket testlum-cond-true-bucket" alias="S3_0">
<bucket comment="Check ability to create new bucket testlum-cond-true-bucket">
<create>testlum-cond-true-bucket</create>
</bucket>
</s3>

<condition comment="Step 2 - create condition that evaluates to true for bucket removal"
name="removeBucket"
spel="true"/>

<s3 comment="Step 3 - remove testlum-cond-true-bucket only if removeBucket condition is true" alias="S3_0" condition="removeBucket">
<bucket comment="Check that bucket remove executes when condition is true">
<remove>testlum-cond-true-bucket</remove>
</bucket>
</s3>

<!-- Test Case 2: condition = false → bucket remove is skipped, bucket still exists -->

<s3 comment="Step 1 - create new bucket testlum-cond-false-bucket" alias="S3_0">
<bucket comment="Check ability to create new bucket testlum-cond-false-bucket">
<create>testlum-cond-false-bucket</create>
</bucket>
</s3>

<condition comment="Step 2 - create condition that evaluates to false, bucket removal must be skipped"
name="keepBucket"
spel="false"/>

<s3 comment="Step 3 - remove testlum-cond-false-bucket only if keepBucket condition is true - must be skipped" alias="S3_0" condition="keepBucket">
<bucket comment="Check that bucket remove is skipped when condition is false">
<remove>testlum-cond-false-bucket</remove>
</bucket>
</s3>

<s3 comment="Step 4 - verify testlum-cond-false-bucket still exists by uploading a file" alias="S3_0">
<file comment="Check ability to upload upload_1.json to confirm bucket still exists"
bucket="testlum-cond-false-bucket"
key="/testlum/upload_1.json">
<upload>upload_1.json</upload>
</file>
</s3>

<s3 comment="Step 4b - verify uploaded file to confirm bucket is accessible after skipped removal" alias="S3_0">
<file comment="Check that upload_1.json in testlum-cond-false-bucket matches expected_1.json"
bucket="testlum-cond-false-bucket"
key="/testlum/upload_1.json">
<download>
<file>expected_1.json</file>
</download>
</file>
</s3>

<s3 comment="Step 1 - create new bucket testlum-cond-and-bucket" alias="S3_0">
<bucket comment="Check ability to create new bucket testlum-cond-and-bucket">
<create>testlum-cond-and-bucket</create>
</bucket>
</s3>

<condition comment="Step 2a - create first partial condition for AND combination"
name="conditionA"
spel="true"/>

<condition comment="Step 2b - create second partial condition for AND combination"
name="conditionB"
spel="false"/>

<condition comment="Step 2c - combine conditions with AND - result is always false"
name="combinedFalseCondition"
spel="conditionA and conditionB"/>

<s3 comment="Step 3 - remove testlum-cond-and-bucket using combined false condition - must be skipped" alias="S3_0" condition="combinedFalseCondition">
<bucket comment="Check that bucket remove is skipped when combined AND condition is false">
<remove>testlum-cond-and-bucket</remove>
</bucket>
</s3>

<s3 comment="Step 4 - verify testlum-cond-and-bucket still exists after skipped combined condition" alias="S3_0">
<file comment="Check ability to upload upload_1.json to confirm bucket still exists after skipped removal"
bucket="testlum-cond-and-bucket"
key="/testlum/upload_1.json">
<upload>upload_1.json</upload>
</file>
</s3>

<s3 comment="Step 4b - verify file in testlum-cond-and-bucket to confirm bucket is intact" alias="S3_0">
<file comment="Check that upload_1.json in testlum-cond-and-bucket matches expected_1.json"
bucket="testlum-cond-and-bucket"
key="/testlum/upload_1.json">
<download>
<file>expected_1.json</file>
</download>
</file>
</s3>

</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "TOP"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "TOP"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "The Best"}
100 changes: 100 additions & 0 deletions REGRESSION/resources/scenarios/storage/s3/condition_file/scenario.xml
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.

no condition for file command

Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<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>Condition file test: remove file only if condition is true, verify other files in bucket remain unchanged if condition is false</description>
<name>S3 Condition File scenario</name>
</overview>

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

<s3 comment="Step 1 - create new bucket testlum-cond-file-bucket" alias="S3_0">
<bucket comment="Check ability to create new bucket testlum-cond-file-bucket">
<create>testlum-cond-file-bucket</create>
</bucket>
</s3>

<s3 comment="Step 2 - upload upload_1.json to testlum-cond-file-bucket" alias="S3_0">
<file comment="Check ability to upload upload_1.json, targeted for conditional removal"
bucket="testlum-cond-file-bucket"
key="/testlum/upload_1.json">
<upload>upload_1.json</upload>
</file>
</s3>

<s3 comment="Step 2b - upload upload_2.json to testlum-cond-file-bucket" alias="S3_0">
<file comment="Check ability to upload upload_2.json, expected to remain after condition check"
bucket="testlum-cond-file-bucket"
key="/testlum/upload_2.json">
<upload>upload_2.json</upload>
</file>
</s3>

<s3 comment="Step 3 - verify upload_1.json upload via file comparison" alias="S3_0">
<file comment="Check that downloaded upload_1.json matches expected_1.json"
bucket="testlum-cond-file-bucket"
key="/testlum/upload_1.json">
<download>
<file>expected_1.json</file>
</download>
</file>
</s3>

<s3 comment="Step 3b - verify upload_2.json upload via file comparison" alias="S3_0">
<file comment="Check that downloaded upload_2.json matches expected_2.json"
bucket="testlum-cond-file-bucket"
key="/testlum/upload_2.json">
<download>
<file>expected_2.json</file>
</download>
</file>
</s3>

<condition comment="Step 4 - create condition that evaluates to true, file removal must execute"
name="removeFile"
spel="true"/>

<s3 comment="Step 5 - remove upload_1.json only if removeFile condition is true - must execute" alias="S3_0" condition="removeFile">
<file comment="Check that upload_1.json is removed when condition is true"
bucket="testlum-cond-file-bucket"
key="/testlum/upload_1.json">
<remove/>
</file>
</s3>

<condition comment="Step 4b - create condition that evaluates to false, file removal must be skipped"
name="keepFile"
spel="false"/>

<s3 comment="Step 5b - remove upload_2.json only if keepFile condition is true - must be skipped" alias="S3_0" condition="keepFile">
<file comment="Check that upload_2.json is not removed when condition is false"
bucket="testlum-cond-file-bucket"
key="/testlum/upload_2.json">
<remove/>
</file>
</s3>

<s3 comment="Step 6 - verify upload_2.json still exists and content is unchanged after skipped removal" alias="S3_0">
<file comment="Check that upload_2.json remains unchanged in bucket after condition false"
bucket="testlum-cond-file-bucket"
key="/testlum/upload_2.json">
<download>
<file>expected_2.json</file>
</download>
</file>
</s3>

<s3 comment="Step 6b - verify upload_2.json content via inline value as additional assertion" alias="S3_0">
<file comment="Check upload_2.json content matches inline value after skipped removal"
bucket="testlum-cond-file-bucket"
key="/testlum/upload_2.json">
<download>
<value>{"Testlum": "The Best"}</value>
</download>
</file>
</s3>

</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "TOP"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "The Best"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "TOP"}
57 changes: 57 additions & 0 deletions REGRESSION/resources/scenarios/storage/s3/repeat/scenario.xml
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.







{{result}} 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.

<var comment="Create variable with constant value"
     name="result">
    <constant value="0"/>
</var>

<repeat comment="Using repeat tag to perform a repetitive task"
        variations="variation_example.csv">
    <var comment="Create variable with constant value"
         name="result">
        <expression value="{{result}} + {{a}}"/>
    </var>
</repeat>

<assert comment="check value of result after repeat">
    <equal comment="Check equality of result variable to sum of all digits in variations">
        <content>{{result}}</content>
        <content>6</content>
    </equal>
</assert>

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.

  1. create bucket
  2. repeat
  3. inside repeat upload files
  4. outside repeat check files

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<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 S3 test: execute storage upload and verify operation multiple times, validate operation
result for each execution
</description>
<name>S3 Repeat scenario</name>
</overview>

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

<repeat comment="Repeat s3 storage operations with content verification for N number of times" times="4">

<s3 comment="Precondition - create testlum-repeat-bucket-one before repeat block" alias="S3_0">
<bucket comment="Check ability to create testlum-repeat-bucket-one for repeat test">
<create>testlum-repeat-bucket-one</create>
</bucket>
</s3>

<s3 comment="Execute upload_1.json storage operation within repeat" alias="S3_0">
<file comment="Check ability to upload upload_1.json to testlum-repeat-bucket-one on each iteration"
bucket="testlum-repeat-bucket-one"
key="/testlum/upload_1.json">
<upload>upload_1.json</upload>
</file>
</s3>

<s3 comment="Execute file download on each repeat iteration to check content" alias="S3_0">
<file comment="Verify file content matches expected file on each repeat iteration"
bucket="testlum-repeat-bucket-one" key="/testlum/upload_1.json">
<download>
<file>expected_1.json</file>
</download>
</file>
</s3>

<s3 comment="Execute file download on each repeat iteration to check inline content" alias="S3_0">
<file comment="Verify file content matches inline on each repeat iteration"
bucket="testlum-repeat-bucket-one" key="/testlum/upload_1.json">
<download>
<value>{"Testlum": "TOP"}</value>
</download>
</file>
</s3>

<s3 comment="Remove testlum-repeat-bucket-one to proceed next iteration" alias="S3_0">
<bucket comment="Removing bucket">
<remove>testlum-repeat-bucket-one</remove>
</bucket>
</s3>
</repeat>

</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "TOP"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "TOP"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "The Best"}
100 changes: 100 additions & 0 deletions REGRESSION/resources/scenarios/storage/s3/self/scenario.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<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 S3 test: create bucket, upload file, verify upload by download and compare, remove file, remove bucket</description>
<name>S3 Self scenario</name>
</overview>

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

<s3 comment="Step 1 - create new bucket testlum-self-bucket-one" alias="S3_0">
<bucket comment="Check ability to create new bucket testlum-self-bucket-one">
<create>testlum-self-bucket-one</create>
</bucket>
</s3>

<s3 comment="Step 2 - upload upload_1.json to testlum-self-bucket-one" alias="S3_0">
<file comment="Check ability to upload upload_1.json to testlum-self-bucket-one"
bucket="testlum-self-bucket-one"
key="/testlum/upload_1.json">
<upload>upload_1.json</upload>
</file>
</s3>

<s3 comment="Step 3 - verify upload_1.json via file comparison" alias="S3_0">
<file comment="Check that downloaded upload_1.json matches expected_1.json"
bucket="testlum-self-bucket-one"
key="/testlum/upload_1.json">
<download>
<file>expected_1.json</file>
</download>
</file>
</s3>

<s3 comment="Step 3b - verify upload_1.json via inline value comparison" alias="S3_0">
<file comment="Check that downloaded upload_1.json matches inline expected value"
bucket="testlum-self-bucket-one"
key="/testlum/upload_1.json">
<download>
<value>{"Testlum": "TOP"}</value>
</download>
</file>
</s3>

<s3 comment="Step 4 - remove upload_1.json from testlum-self-bucket-one" alias="S3_0">
<file comment="Check ability to remove upload_1.json from testlum-self-bucket-one"
bucket="testlum-self-bucket-one"
key="/testlum/upload_1.json">
<remove/>
</file>
</s3>

<s3 comment="Step 5 - remove testlum-self-bucket-one" alias="S3_0">
<bucket comment="Check ability to remove testlum-self-bucket-one after file cleanup">
<remove>testlum-self-bucket-one</remove>
</bucket>
</s3>

<s3 comment="Step 1 - create bucket testlum-self-bucket-one again after it was removed" alias="S3_0">
<bucket comment="Check ability to create bucket with same name after previous removal">
<create>testlum-self-bucket-one</create>
</bucket>
</s3>

<s3 comment="Step 2 - upload upload_1.json to re-created testlum-self-bucket-one" alias="S3_0">
<file comment="Check ability to upload upload_1.json to re-created bucket"
bucket="testlum-self-bucket-one"
key="/testlum/upload_1.json">
<upload>upload_1.json</upload>
</file>
</s3>

<s3 comment="Step 3 - verify upload in re-created bucket via file comparison" alias="S3_0">
<file comment="Check that upload_1.json in re-created bucket matches expected_1.json"
bucket="testlum-self-bucket-one"
key="/testlum/upload_1.json">
<download>
<file>expected_1.json</file>
</download>
</file>
</s3>

<s3 comment="Step 4 - remove upload_1.json from re-created testlum-self-bucket-one" alias="S3_0">
<file comment="Check ability to remove upload_1.json from re-created bucket"
bucket="testlum-self-bucket-one"
key="/testlum/upload_1.json">
<remove/>
</file>
</s3>

<s3 comment="Step 5 - remove re-created testlum-self-bucket-one" alias="S3_0">
<bucket comment="Check ability to remove re-created testlum-self-bucket-one">
<remove>testlum-self-bucket-one</remove>
</bucket>
</s3>

</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "TOP"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "The Best"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Testlum": "TOP"}
Loading