-
Notifications
You must be signed in to change notification settings - Fork 15
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
Update undesirable behavior impact collection details #939
Changes from all commits
f1611f5
51fda5e
c120503
38728d6
cde9ced
ddba40f
f68ab93
cd25da1
d29bbc9
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 |
---|---|---|
|
@@ -774,7 +774,7 @@ const graphqlSchema = gql` | |
|
||
enum UnexpectedBehaviorImpact { | ||
MODERATE | ||
HIGH | ||
SEVERE | ||
} | ||
|
||
""" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,21 +169,21 @@ const getMetrics = ({ | |
const result = { scenarioResult, testResult, testPlanReport }; | ||
|
||
// Each command has 2 additional assertions: | ||
// * Other behaviors that create high negative impact | ||
// * Other behaviors that create severe negative impact | ||
// * Other behaviors that create moderate negative impact | ||
const commandsCount = countCommands({ ...result }); | ||
|
||
const highImpactFailedAssertionCount = countUnexpectedBehaviorsImpact( | ||
const severeImpactFailedAssertionCount = countUnexpectedBehaviorsImpact( | ||
{ ...result }, | ||
'HIGH' | ||
'SEVERE' | ||
); | ||
const moderateImpactFailedAssertionCount = countUnexpectedBehaviorsImpact( | ||
{ ...result }, | ||
'MODERATE' | ||
); | ||
|
||
const highImpactPassedAssertionCount = | ||
commandsCount - highImpactFailedAssertionCount; | ||
const severeImpactPassedAssertionCount = | ||
commandsCount - severeImpactFailedAssertionCount; | ||
const moderateImpactPassedAssertionCount = | ||
commandsCount - moderateImpactFailedAssertionCount; | ||
|
||
|
@@ -193,8 +193,8 @@ const getMetrics = ({ | |
assertionsFailedCount: requiredAssertionsFailedCount | ||
} = calculateAssertionPriorityCounts(result, 'REQUIRED'); | ||
requiredAssertionsCount += commandsCount; | ||
requiredAssertionsPassedCount += highImpactPassedAssertionCount; | ||
requiredAssertionsFailedCount += highImpactFailedAssertionCount; | ||
requiredAssertionsPassedCount += severeImpactPassedAssertionCount; | ||
requiredAssertionsFailedCount += severeImpactFailedAssertionCount; | ||
|
||
let { | ||
assertionsCount: optionalAssertionsCount, | ||
|
@@ -262,8 +262,8 @@ const getMetrics = ({ | |
testsCount, | ||
testsFailedCount, | ||
unexpectedBehaviorCount, | ||
highImpactPassedAssertionCount, | ||
highImpactFailedAssertionCount, | ||
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. The name 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 think this comment may have been before the latest changes from main were merged in here, so this may be outdated? 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. You're right! |
||
severeImpactPassedAssertionCount, | ||
severeImpactFailedAssertionCount, | ||
moderateImpactPassedAssertionCount, | ||
moderateImpactFailedAssertionCount, | ||
commandsCount, | ||
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. Since metrics are saved in the database does that mean we should have a migration to make sure the metrics are up-to-date? 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. Since this hasn't yet gone to the production environment yet to affect that database, no need to write that migration. There wouldn't be any metrics that include those properties just yet. |
||
|
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.
For consistency, where possible can we call these unexpected behaviors?