-
1. Re: Using several and related datasets
bmajsak Jan 6, 2013 12:20 PM (in response to neopk)Hi,
in order to help you I need some more details
1. What kind of test failure message are you getting?
2. Is there something related in the server logs?
And last but not least, would it be possible to share the code so I can investigate the problem using "working" example?
Cheers,
Bartosz
-
2. Re: Using several and related datasets
neopk Jan 7, 2013 4:36 AM (in response to bmajsak)Hi,
Thanks for your response.
My test class is very simple because i would understand how to pass several datasets :
/**
* Classe de test pour l'ejb UserBean.
*
* @author
*/
@Test
public class UserBeanTest extends Arquillian {
/** User. */
@EJB
private UserBean userBean;
/**
* Creation du war à tester.
*
* @return l'archive générée.
* @throws ClassNotFoundException
*/
@Deployment
public static Archive<?> createDeploymentPackage() throws ClassNotFoundException {
return Deploiement.getArchive(UserBean.class, User.class);
}
@Test(priority = 3)
@UsingDataSet("test2.xml")
public void testSearchUser() {
System.out.println("-------------test1-----------------------------");
}
@Test(priority = 1)
@UsingDataSet("test2.xml")
public void testSearchById() {
System.out.println("-------------test2-----------------------------");
}
@Test(priority = 1)
@UsingDataSet("test2.xml")
public void testSearchByName() {
System.out.println("-------------test3-----------------------------");
}
@Test(priority = 2)
@UsingDataSet({ "title.xml", "user.xml" })
public void testSearchByNameTitle() {
System.out.println("-------------test4-----------------------------");
}
}
In my user.xml :
<dataset>
<user id="1" codeTitle="Mr" lastname="PENDI" firstname="Jean"/>
</dataset>
In my title.xml
<dataset>
<title codeTitle="Ms" label="Miss" />
<title codeTitle="Mr" label="Mister" />
<title codeTitle="CH" label="Child" />
</dataset>
In My test2.xml (without column which have relationship)
<dataset>
<user id="1" lastname="PENDI" firstname="Jean"/>
</dataset>
I don't have code in test because i would know if the problem came from my test. And I put priority to be sure that the 4th test will not be the least. In this case the test 1 is not passed because I don't have the sysout in the console, despite of testNG said me that 4 test passed.
And there is nothing in logs and no message failure ...
Thanks for your help
-
3. Re: Using several and related datasets
bmajsak Aug 29, 2013 9:06 AM (in response to neopk)Hi neopk,
With Alpha6 I solved the problem which might be related to your case. In brief datasets were not executed in the order they were specified in the annotation. Have you tried with Alpha6? Does the problem still exist?