Page 1 of 1

Documenation on Testing

Posted: Wed Mar 06, 2013 1:24 pm
by TNuzzi
All,
I was looking for some detailed documentation on setting up jUnit/TestNG test cases. From previous posts I learned I should look at the integration branch in git (and I downloaded it). I incorporated that into my src/test/java directory under the site project.

I ran a very primative TestNG test case but not too sure if the environment is setup correctly. I see broadbroad leaf bootstrapping the context but I see these error messages SchemaUpdate - user lacks privilege or object not found: <some table name>. Do I need to change one of the .properties files for testing?

In the end, I would like to know if there are steps for setting up the testing harness for integration testing to be run in CI.

Thanks,

Tony

Re: Documenation on Testing

Posted: Fri Mar 08, 2013 12:45 pm
by jefffischer
I would make sure your project's integration module has a dependency on broadleaf's integration jar (test classifier). Then, I would create your own version of org.broadleafcommerce.test.BaseTest in which you add in any additional app contexts required for your app (if necessary). Then, in the test/java directory of your integration project, add any TestNG tests that you like and make sure that your test class extend from your BaseTest. I think that should work.