Closed perabello closed 10 years ago
Hello Pere, for getting datasets to work you have to additionally annotate the deployment methods in the suite class with @UsingDataSet. So the dataset annotation have to be there twice, one in your test class and a second on deployment method. Peter
Ok. With your instructions it runs. I was setting @UsingDataSet only in one class. Now I have a big dataset xml. Could I use diferents xml with the same deployment (one xml for each test class)?
I found it!!! All xml files must be defined on deployment class, and then it can be used on every class. Thanks Pere
I have problems with defaultTransactionMode configuration. It does not run and I must to set the annotation on every test. I seems a dependencies versions problems (http://stackoverflow.com/questions/20662548/rollback-transaction-for-arquillian-testing-getting-nullpointerexception), but I can not resolve it.
Furthermore, I can test a delete no tables with a relationship. I have table A that is related to table B. When I delete a register from A, I validate that not exists related registers on B. My test is: managerB.delete(regB); managerA.delete(regA); It fails deleting A, because the validation still finds regB. And it runs when I have a deployment for every test class.
Could you try preparing simple test project on witch i could test it?
Did you tried http://stackoverflow.com/a/24952911/3083920 ?
Yes, I have already copied that link in my comment. But forget it. I try again without arquillian-suite-extension and it still fails.
Now I am trying to prepare a simple project on which you could test the second problem. I think that I will can upload it this afternoon.
I have encountered same issue, I just started using 'arquillian-suite-extension' extension. @UsingDataSet annotation is not working. I have tried the solution you said above @PeterProbst but not working :(
You must set the annotation on Deployment method (with a list of all files used on test) and then on every test method. Example
I am using @UsingDataSet("abc.yml"); yaml data set. and it's not working.
Hey it's working now :+1: Cheers !
Don't close the issue, It yet exist in some cases. For example; I have two test classes
@suitDeployment public void mainDeployment(){
// my deployments methods upto 4 in my case
// here @usingDataSet is working // test methods }
public void AnotherTestClass{
// here is this class @UsingDataSet is not working. //test mothods
}
Note: Ignore some of my type errors.
Hello,
I use Persistence and DBUnit extension to set (on arquillian.xml) defaultDataSource, defaultDataSeedStrategy, datatypeFactory, defaultDataSetLocation, etc. I do not find how to configure it integrated with ArquillianSuiteExtension. I use @UsingDataSet annotation to bind data before test from xml. I have a diferent xml for each test class or method. But when tests can not find values inserted on BBDD from xml. It seems that properties like "datatypeFactory" are not uset. How I configure persistence dbunit properties? Could I set a @UsingDataSet annotation for every test method?
Thanks Pere