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
Integration Tests refactor (move API testing logic to separate classes) #5884
Merged
Conversation
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
…eleted by database drop in fixture setup).
- moved all API URL generation logic & API response handling logic to separate classes - created ApiTestConfig class to hold API test options (and documentation for properties) - remove unnecessary IntegrationTestCase properties and methods (including apiNotToCall/apiToCall) - remove as many unnecessary API test options as possible (including abandonedCarts, hackDeleteRangeArchivesBefore) - rename checkRequestResponse to assertApiResponseHasNoError
Closed by accident |
…/angularjs/scripts/install-ubuntu.sh to remove random travis failure.
…ter is used to filter all websites
…ld really introduce a model for sitesManager to not having directly to expose methods
…API. I tried to write a test for this but was not able to since lots of IntegrationTest magic
$fieldsToRemove = @$this->params['xmlFieldsToRemove']; | ||
} | ||
|
||
$fieldsToRemove[] = 'idsubdatatable'; // TODO: had testNotSmallAfter, should still? |
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.
Let's leave the testNotSmallAfter test as I think it may detect bug in some cases
mattab
pushed a commit
that referenced
this pull request
Aug 1, 2014
Integration Tests refactor (move API testing logic to separate classes)
looks good! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refactoring of IntegrationTestCase for code clarity and cleanliness. Reduces the size of IntegrationTestCase.php and removes a lot of testing hacks.
Includes the following changes:
Verification:
I verified that all tests are being executed (master & this branch execute the same test cases and same API test URLs). There is a difference in the number of assertions reported by phpunit, however:
Integration 998 (master) => 997 (tests refactor)
Plugin 2489 (master) => 2481 (tests refactor)
Core 1257 (master) => 1259 (tests refactor)
I can't locate the cause of the discrepancy, but I don't think it matters considering the same amount of API urls and test cases are tested.