aqa-test-tools
aqa-test-tools copied to clipboard
Define API for aggregate dashboard data
From #16, data that matters: [ # pass, # fail, # excluded, # lastPass, # lastFail, # lastExcluded, platform, impl, version, testGroup ]
definitions: TA = totalsArray is [totalPass, totalFail, totalSkipped, totalExcludes] sdkID = combo of Jenkins Job/BuildID info and SHAs that uniquely define the sdk binary being tested (shas of CL, VM, OMR, ...)
API:
TA = getTotals(sdkID)
TA = getTotalsForGroup(testGroup, sdkID)
TA = getTotalsForPlatform(platform, sdkID)
TA = getTotalsForJDKImpl(impl, sdkID)
TA = getTotalsForLevel(impl, sdkID)
TA = getTotalsForPlatformAndGroup(platform, testGroup, sdkID)
TA = getTotalsForLevelPlatformImpl(level, platform, impl, sdkID)
TA = getTotalsForLevelGroupPlatformImpl(level, group, platform, impl, sdkID)
sdkID = getPreviousBuildID(sdkID)
sdkID = getPreviousReleaseID(sdkID)
The underlying implementation of this API can be optimized and reuse common code (as most methods do the same activity, pulling pass/fail/skip/excludes data from the DB and add them to create totalsArray). In initial MVP, excludes data is not populated.
Note: we will use the combo of url, buildName and BuildNum as sdkID until we update the parser code to store shas of CL, VM, OMR.
Implementation update:
Our data is stored as a tree structure, so it is easy to do above seach by using graphLookup:
https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/#pipe._S_graphLookup
I have an initial version working in my local:
api/getTotalsForPlatformAndGroup?buildName=Pipeline-Build-Test-All&url=https://ci.eclipse.org/openj9&buildNum=410&level=sanity&group=functional&platfrom=osx_x86-64_cmprssptrs
output:
[
{
_id: { },
total: 404,
executed: 222,
failed: 0,
skipped: 182
}
]