Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following table data.
Scenario. Test case. Status
A. 1. Pass
A 1. Pass
A 1. Fail
B. 1. Pass
B. 1. Pass
I need to get another column named ' Overall status's for the scenario, whose value should be based on below logic:-
If all test case status are Passed , overall status is Pass
If atleast one of the testcase status is failed, overall status is Failed.
Can someone help me how to achieve this.
hmm you should give the completed data sample , never mind .. try like this
Test:
LOAD * Inline
[
Scenario,Test case,Status
A,1,Pass
A,1,Pass
A,1,Fail
A,1,Blocked
B,1,Pass
B,1,Pass
];
Join(Test)
LOAD Status,
Dual(Status,Status_value) as Status_Derived;
LOAD * Inline
[
Status,Status_value
Pass,3
Fail,1
Blocked,2
];
Left Join(Test)
LOAD
Scenario,
"Test case",
if(min(Status_Derived)=3,'Pass','Fail') as Overall_Status_Num
Resident
Test
Group by
Scenario,
"Test case";
Find the solution below
Test:
LOAD * Inline
[
Scenario,Test case,Status
A,1,Pass
A,1,Pass
A,1,Fail
B,1,Pass
B,1,Pass
];
Left Join(Test)
LOAD
Scenario,
"Test case",
MinString(Status) as Overall_Status
Resident
Test
Group by
Scenario,
"Test case";
Output:
Hi,
It works fine for status as Pass , Fail.
But if I have a combination of Blocked , Fail, Pass I expect to get overall status as Fail, but using the above solution , I would get the overall status as Blocked.
hmm you should give the completed data sample , never mind .. try like this
Test:
LOAD * Inline
[
Scenario,Test case,Status
A,1,Pass
A,1,Pass
A,1,Fail
A,1,Blocked
B,1,Pass
B,1,Pass
];
Join(Test)
LOAD Status,
Dual(Status,Status_value) as Status_Derived;
LOAD * Inline
[
Status,Status_value
Pass,3
Fail,1
Blocked,2
];
Left Join(Test)
LOAD
Scenario,
"Test case",
if(min(Status_Derived)=3,'Pass','Fail') as Overall_Status_Num
Resident
Test
Group by
Scenario,
"Test case";