Closed hemanthsridhar closed 8 years ago
Hi there!
Currently Allure doesn't support multiply test IDs. Could you please explain in more details why did you need such feature?
Linking similar issue #773
@baev Hi bro. I need this feature because, sometimes I write a method which handles multiple test cases. Hence I need to give what test cases the particular method covers.(Trust me it is pretty much needed). Also, I would like to add that if I am using testng parameters and I give multiple test IDs(assuming you will agree to do this) the test case id should map to test data set.
Eg : @TestCaseId("001","002","003")
@Test(I will read the data from the data provider)
public void testForAllure(String username,String password)
{
sysout("username")
sysout("password")
}
From the data provider I read data sets
{'hemanth','sridhar'},
{'yo','yo'}
{'bla','bla'}
In the report testForAllure[hemanth,sridhar] should have 001 as test case ID testForAllure[yo,yo] should have 002 as test case ID testForAllure[bla,bla] should have 003 as test case ID
You can put your test case id if you want to in your data provider.
@TestCaseId("{0}")
public void test(String testcase,String usernaame, String password){
}
That's nice. Thank you :).
But then again. I wish to have @Test case Id being multiple
Any update on this?
Placeholder in TestCaseId does not work. It shows as String Test ID: {0} in the report.
I am looking for a similar feature. I have manual tests for each dataset and there is no way to tag each test case with these multiple testIds.
@irushah when you are doing the same solution given by @thasherwin right? meaning reading from data provider
@hemanthsridhar Yup, exactly, i am reading the first parameter from data provider Eg: For @TestCaseId("{0}") where first param is testcaseId = 123 below
@DataProvider(name = "dataset")
private Object[][] getDataSet() {
return new Object[][] {
{ "123" , "username", "password"},
};
}
i am having the same problem too. @thasherwin
I checked also and it those not work indeed. I would expect this to work. Guess an issue or this was never implemented
Closed as duplicate (see #773)
Can I give multiple test case IDs. Because I am not able to use @TestCaseId("","",""). Just like how we give multiple Issues I feel it is better to have @TestCaseId as an array. Or if there is a way to do it, please help me out.