Skip to content
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

Added Test Result Sorting #96

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AkRampersad
Copy link
Contributor

Description

This branch is implementing json sorting for the actual and expected json files produced. Sorting the jsons so that they are produced in a standard order will help with testing in the future . It will be easier to determine when and where changes are made. This push also includes the new sorted outputs.

How Has This Been Tested?

I visually identified that the ordering was correct after it was changed and used online JSON comparison tools to help with this.

AkRampersad and others added 2 commits October 28, 2024 13:59
…json files produced. Sorting the jsons so that they are produced in a standard order will help with testing in the future . It will be easier to determine when and where changes are made. This push also includes the new sorted outputs.
@rhdolin
Copy link
Collaborator

rhdolin commented Oct 28, 2024

@AkRampersad Can you confirm - does this affect normal Operations responses, or is the sorting only applied when comparing against test cases?

@AkRampersad
Copy link
Contributor Author

@AkRampersad Can you confirm - does this affect normal Operations responses, or is the sorting only applied when comparing against test cases?

This sorting is only applied when comparing the test cases. The sorting is found in the
def compare_actual_and_expected_output(filename, actual_json): function. The responses generated from Mongo are not sorted.

@rhdolin rhdolin requested a review from mihaitodor October 28, 2024 20:48
…runs the function on a JSON with nested dictionaries that are out of order. The other test runs the function on a simple 1 layer json. This commit also has a assertion check in tu.compare_actual_and_expected_output to make sure that the expected output is sorted correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants