-
Notifications
You must be signed in to change notification settings - Fork 39
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
Improve new CLI testing ensuring complete coverage of arguments cases #652
Conversation
Signed-off-by: Partho Sarthi <[email protected]>
Signed-off-by: Partho Sarthi <[email protected]>
Signed-off-by: Partho Sarthi <[email protected]>
Signed-off-by: Partho Sarthi <[email protected]>
# Conflicts: # user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py
user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Partho Sarthi <[email protected]>
Signed-off-by: Partho Sarthi <[email protected]>
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.
LGTM. Thanks @parthosa !
Signed-off-by: Partho Sarthi <[email protected]>
user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py
Outdated
Show resolved
Hide resolved
user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Partho Sarthi <[email protected]>
Signed-off-by: Partho Sarthi <[email protected]>
Signed-off-by: Partho Sarthi <[email protected]>
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.
Thanks @parthosa!
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.
Thanks @parthosa !
Fixes #562.
1. Changes:
platform
,cluster
,event logs
fields.2. New CLI User Input:
ascli --platform <platform> --cluster <cluster> --eventlogs <eventlogs> [remainings args..]
3. Possible States:
undefined
oractual value
.undefined
,cluster name
,cluster property file
orauto tuner file
.undefined
oractual value
.4. Cases Covered:
We have a total of 16 cases (2 X 4 X 2). However, among these, there are only 8 unique test cases. Each of the 8 test case has an argument (platform or event logs) for which the result (pass or fail) remains same irrespective of the argument's value. Thus, each of the 8 test cases has two sub-cases: (a) argument is provided, and (b)argument is not provided.
For example, consider the user input where cluster argument is not provided but event logs are provided. It should pass whether the platform is provided or not.
List of Test Cases:
5. Code Changes:
user_tools/tests/spark_rapids_tools_ut/test_tool_argprocessor.py
:@register_triplet_test decorator
with the parameters<platform, cluster, eventlog>
. This decorator is responsible for adding the triplet value to a global dictionary.6. Correctness Check:
The final unit test,
test_arg_cases_coverage
, checks if the dictionary contains all 16 triplets, thus ensuring that these unit tests cover all 16 cases.