java - Gradle test tasks with webcontext fails to use entities -


I have a problem with some graded work that should run tests. Since it has some legacy from ant functions, we do not want to include them in our test suite. Particularly considered in those things to be examined, and made by us, and used on a regular basis, spok and janit are used.

The problem is that these tests are using some references that work very well, I run those tests under the eclipse IDE, but if I try sth, then this Fails:

  Function testingNegistance (type: test, dependon: test classes) {useTestNG () includes = ["** / * IT *"]}   

But when I try to use that task, then "org.hibernate.MappingException: Ignore Error "," error "," unit "or" java.lang.IllegalArgumentException. "The query defined for that name is"

< P> Actually the problem is deep. Gradle is trying to be smart and whatever folder has defined it, it puts class files in the class folder, and puts all other files into resources when persistence.xml is loaded, then annotated entities Is scanned for the folder that starts with the Class Path root, it exists in (i.e. build / resource / main). Since these classes are in construction / class / main, therefore they fail to find them. The work I've done offers two copy functions, copying persistence.xml into a named folder named, and running back in resources after the second test files. To ensure that some tests fail, you also want to use something like testNgTesting.finalizedBy (cleanAfterIntegrationTests).

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -