-
-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISSUE-409 # Added support for csv file in the parameterized
csvSource
#476
Merged
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c6ad3d7
Added support for csv file for csvSource
imprashant 5db65b4
Added support to ignore header in CSV file
imprashant 5f15cc8
Added Unit tests for Parameterized csv source from file
imprashant 8b5e52f
Added Integration tests for Parameterized csv source from file
imprashant 0fa5260
Fixed failing tests
imprashant f4f3800
Merge branch 'master' into 409-csvsource-from-file
authorjapps 8cf0bdc
resource path retained
nirmalchandra 7be9a17
Unit tests fixed after method path fix
nirmalchandra 58c7c66
Unit test files count updated
nirmalchandra 9763ffd
RESOLVED Conflicts
nirmalchandra 082dc1a
Merge branch 'master' into 409-csvsource-from-file
authorjapps dcad5cc
Merge branch 'master' into 409-csvsource-from-file
authorjapps File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...urces/unit_test_files/engine_unit_test_jsons/08.1_parameterized_csv_source_from_file.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"valueSource": [ | ||
"hello", | ||
123, | ||
true | ||
], | ||
"csvSource": "unit_test_files/engine_unit_test_jsons/params.csv" | ||
} |
9 changes: 9 additions & 0 deletions
9
...les/engine_unit_test_jsons/08.2_parameterized_csv_source_from_file_containing_header.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"valueSource": [ | ||
"hello", | ||
123, | ||
true | ||
], | ||
"ignoreHeader": true, | ||
"csvSource": "unit_test_files/engine_unit_test_jsons/params_with_header.csv" | ||
} |
2 changes: 2 additions & 0 deletions
2
core/src/test/resources/unit_test_files/engine_unit_test_jsons/params.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
octocat,The Octocat,San Francisco,583231 | ||
siddhagalaxy,Sidd,UK,33847730 |
3 changes: 3 additions & 0 deletions
3
core/src/test/resources/unit_test_files/engine_unit_test_jsons/params_with_header.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
user,name,city,userid | ||
octocat,The Octocat,San Francisco,583231 | ||
siddhagalaxy,Sidd,UK,33847730 |
3 changes: 0 additions & 3 deletions
3
...ng/src/main/java/org/jsmart/zerocode/zerocodejavaexec/httpclient/JustHelloWorldSuite.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...urces/parameterized_csv/hello_world_test_parameterized_csv_source_file_ignore_header.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"scenarioName": "Fetch and assert GitHub userIds by their userNames", | ||
"steps": [ | ||
{ | ||
"name": "get_user_details", | ||
"url": "/users/${0}", | ||
"method": "GET", | ||
"request": { | ||
}, | ||
"assertions": { | ||
"status": 200, | ||
"body": { | ||
"login" : "${0}", | ||
"type" : "User", | ||
"name" : "${1}", | ||
"location" : "${2}", | ||
"id" : "$EQ.${3}" | ||
} | ||
} | ||
} | ||
], | ||
"parameterized": { | ||
"ignoreHeader": true, | ||
"csvSource":"parameterized_csv/params_with_header.csv" | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...src/test/resources/parameterized_csv/hello_world_test_parameterized_csv_source_files.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"scenarioName": "Fetch and assert GitHub userIds by their userNames", | ||
"steps": [ | ||
{ | ||
"name": "get_user_details", | ||
"url": "/users/${0}", | ||
"method": "GET", | ||
"request": { | ||
}, | ||
"assertions": { | ||
"status": 200, | ||
"body": { | ||
"login" : "${0}", | ||
"type" : "User", | ||
"name" : "${1}", | ||
"location" : "${2}", | ||
"id" : "$EQ.${3}" | ||
} | ||
} | ||
} | ||
], | ||
"parameterized": { | ||
"csvSource":"parameterized_csv/params.csv" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
octocat,The Octocat,San Francisco,583231 | ||
siddhagalaxy,Sidd,UK,33847730 |
3 changes: 3 additions & 0 deletions
3
http-testing/src/test/resources/parameterized_csv/params_with_header.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
user,name,city,userid | ||
octocat,The Octocat,San Francisco,583231 | ||
siddhagalaxy,Sidd,UK,33847730 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated code to read from resources folder without referring to "./test/...".
Changed method impl to include Path prefix to "./test/...".
There shohuld be a better way to do this, I have put this as a quick fix. Please feel free to amend this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@imprashant , any news on this comment ? Or are you happy for us to merge it?