-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestResultsQueries.sql
56 lines (49 loc) · 1.07 KB
/
TestResultsQueries.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
SELECT
tr.Id as TestRunId,
s.Id AS ScenarioId,
s.CapabilityPath,
s.FeatureName,
s.Name as ScenarioName,
s.Outcome as ScenarioOutcome,
s.Reason as ScenarioReason,
st.Id as StepId,
st.Name as StepName,
st.MultilineParameter as StepMultilineParameter,
st.Outcome as StepOutcome,
st.Reason as StepReason,
s.StartTime as ScenarioStartTime,
s.EndTime as ScenarioEndTime,
st.StartTime as StepStartTime,
st.EndTime as StepEndTime
FROM TestRun tr
LEFT JOIN Scenario s
ON tr.Id = s.TestRunId
LEFT JOIN Step st
ON s.Id = st.ScenarioId
WHERE tr.Id > 21
AND s.Outcome = 1
ORDER BY tr.Id ASC, s.EndTime ASC, st.EndTime ASC
SELECT
COUNT(Distinct(s.Id))
FROM TestRun tr
LEFT JOIN Scenario s
ON tr.Id = s.TestRunId
LEFT JOIN Step st
ON s.Id = st.ScenarioId
WHERE tr.Id > 21
SELECT
s.Outcome,
COUNT(Distinct(s.Id))
FROM TestRun tr
LEFT JOIN Scenario s
ON tr.Id = s.TestRunId
LEFT JOIN Step st
ON s.Id = st.ScenarioId
WHERE tr.Id > 25
GROUP BY s.Outcome
SELECT TOP 4 Id
FROM TestRun
ORDER bY Id DESC
SELECT @@Version
SELECT * FROM TestRuns
SELECT * FROM Scenarios