-
Notifications
You must be signed in to change notification settings - Fork 48
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
Validation if status codes comparators parameters were provided #296
Changes from 9 commits
b04bcf4
a02d7b0
b168089
08a7011
e34670c
3215cd2
21a4cae
66a0f83
382696c
ae809bc
640ed48
fa61147
ecee6ff
2048de5
618d9fe
e45fa42
55a4c30
79a1fbb
4cbc564
fc7b234
d3c23f9
eb43b1f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,7 +96,7 @@ public void setUp() { | |
@Test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are some issues with this test. Could we resolve them in this pull request? Currently we are not testing much here. It might be a good time to improve this test. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added some tests. The change from failed to passed is the result of changed logic expression when we have both filterCodes and filterRange - before, we had AND between range and codes, now we have OR ;) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! That is great! I had some more ideas (pull request #305). Maybe you would like to get some of them into your feature branch? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitely! Thank you so much for your help :D |
||
public void compareTest() throws ProcessingException { | ||
result = tested.compare(); | ||
assertEquals(ComparatorStepResult.Status.FAILED, result.getStatus()); | ||
assertEquals(ComparatorStepResult.Status.PASSED, result.getStatus()); | ||
} | ||
|
||
@Test | ||
|
@@ -105,7 +105,7 @@ public void compareTest_filterRange() throws ProcessingException { | |
when(params.containsKey(PARAM_FILTER_RANGE)).thenReturn(true); | ||
when(params.get(PARAM_FILTER_RANGE)).thenReturn(FILTER_RANGE); | ||
result = tested.compare(); | ||
assertEquals(ComparatorStepResult.Status.FAILED, result.getStatus()); | ||
assertEquals(ComparatorStepResult.Status.PASSED, result.getStatus()); | ||
} | ||
|
||
@Test | ||
|
@@ -115,7 +115,7 @@ public void compareTest_filterCodes() throws ProcessingException { | |
when(params.get(PARAM_FILTER_CODES)).thenReturn(FILTER_CODES_MULTIPLE); | ||
|
||
result = tested.compare(); | ||
assertEquals(ComparatorStepResult.Status.FAILED, result.getStatus()); | ||
assertEquals(ComparatorStepResult.Status.PASSED, result.getStatus()); | ||
} | ||
|
||
@Test | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#### Status Codes Data Filters | ||
|
||
Data filters will be apply only for codes contained in the `filterange`. If the `filterRange` isn't provided, default range will be used. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please fix the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated |
||
|
||
##### Exclude Filter | ||
|
||
Exclude Filter removes from reports Status Codes results that match specified parameters. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,8 +55,8 @@ Feature: Tests Results Filtering | |
Scenario: Filtering Tests Results: status-codes | ||
Given I have opened sample tests report page | ||
When I search for tests containing "status" | ||
Then There are 20 tiles visible | ||
And Statistics text contains "20 ( 8 / 0 / 12 / 0 )" | ||
Then There are 21 tiles visible | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for this! :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your welcome ;) |
||
And Statistics text contains "21 ( 9 / 0 / 12 / 0 )" | ||
|
||
Scenario: Filtering Tests Results: w3c-html5 | ||
Given I have opened sample tests report page | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,11 +32,24 @@ | |
</compare> | ||
<urls> | ||
<url href="comparators/statuscodes/failed.jsp"/> | ||
<url href="comparators/statuscodes/success.jsp"/> | ||
<url href="comparators/statuscodes/noneexistingPage.jsp"/> | ||
</urls> | ||
</test> | ||
|
||
<test name="F-comparator-StatusCodes-200-success" useProxy="rest"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have new test added here. |
||
<collect> | ||
<open/> | ||
<status-codes/> | ||
<sleep duration="3000"/> | ||
</collect> | ||
<compare> | ||
<status-codes filterCodes="200" showExcluded="true"/> | ||
</compare> | ||
<urls> | ||
<url href="comparators/statuscodes/success.jsp"/> | ||
</urls> | ||
</test> | ||
|
||
<test name="S-comparator-StatusCodes-filter-300-505" useProxy="rest"> | ||
<collect> | ||
<open/> | ||
|
@@ -255,7 +268,7 @@ | |
<sleep duration="3000"/> | ||
</collect> | ||
<compare> | ||
<status-codes showExcluded="true"> | ||
<status-codes filterCodes="200,404" showExcluded="true"> | ||
<exclude url="/sample-site/NonExistingResourceFile.png"/> | ||
</status-codes> | ||
</compare> | ||
|
@@ -304,7 +317,7 @@ | |
<sleep duration="3000"/> | ||
</collect> | ||
<compare> | ||
<status-codes showExcluded="true"> | ||
<status-codes filterCodes="200" showExcluded="true"> | ||
<include pattern="^.*css$"/> | ||
</status-codes> | ||
</compare> | ||
|
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.
Could you please add more information here?
E.g.