Java compilation errors after installing the UnitTesting module.
1
Hello, Using the modeler, and after creating a blank atlas-ui app, then installed "Community Commons Function Library", then "Unit Testing" module, I am getting the following Java compilation errors: ----------------------------------------------------------------------------------------------------- compile: [javac] Compiling 19 source files to C:\test\deployment\run\bin [javac] C:\test\javasource\unittesting\RemoteApiServlet.java:20: error: package objecthandling does not exist [javac] import objecthandling.XPath; [javac] ^ [javac] C:\test\javasource\unittesting\TestManager.java:34: error: package objecthandling does not exist [javac] import objecthandling.XPath; [javac] ^ [javac] C:\test\javasource\unittesting\RemoteApiServlet.java:169: error: cannot find symbol [javac] for(TestSuite suite : XPath.create(context, TestSuite.class).all()) { [javac] ^ [javac] symbol: variable XPath [javac] location: class RemoteApiServlet.TestSuiteRunner [javac] C:\test\javasource\unittesting\RemoteApiServlet.java:180: error: cannot find symbol [javac] for(UnitTest test : XPath.create(context, UnitTest.class) [javac] ^ [javac] symbol: variable XPath [javac] location: class RemoteApiServlet.TestSuiteRunner [javac] C:\test\javasource\unittesting\TestManager.java:188: error: cannot find symbol [javac] for(UnitTest test : XPath.create(context, UnitTest.class).eq(UnitTest.MemberNames.UnitTest_TestSuite, testSuite).all()) { [javac] ^ [javac] symbol: variable XPath [javac] location: class TestManager [javac] C:\test\javasource\unittesting\TestManager.java:380: error: cannot find symbol [javac] res = XPath.create(context, UnitTest.class) [javac] ^ [javac] symbol: variable XPath [javac] location: class TestManager [javac] C:\test\javasource\unittesting\TestManager.java:495: error: cannot find symbol [javac] TestSuite testSuite = XPath.create(context, TestSuite.class).findOrCreate(TestSuite.MemberNames.Module, module); [javac] ^ [javac] symbol: variable XPath [javac] location: class TestManager [javac] C:\test\javasource\unittesting\TestManager.java:502: error: cannot find symbol [javac] XPath.create(context, TestSuite.class).not().hasReference(UnitTest.MemberNames.UnitTest_TestSuite, UnitTest.entityName).close().deleteAll(); [javac] ^ [javac] symbol: variable XPath [javac] location: class TestManager [javac] C:\test\javasource\unittesting\TestManager.java:511: error: cannot find symbol [javac] for(UnitTest test : XPath.create(context, UnitTest.class) [javac] ^ [javac] symbol: variable XPath [javac] location: class TestManager [javac] C:\test\javasource\unittesting\TestManager.java:544: error: cannot find symbol [javac] for(UnitTest test : XPath.create(context, UnitTest.class) [javac] ^ [javac] symbol: variable XPath [javac] location: class TestManager [javac] C:\test\javasource\unittesting\TestManager.java:553: error: cannot find symbol [javac] testSuite.setTestCount(XPath.create(context, UnitTest.class).eq(UnitTest.MemberNames.UnitTest_TestSuite, testSuite).count()); [javac] ^ [javac] symbol: variable XPath [javac] location: class TestManager [javac] 11 errors ----------------------------------------------------------------------------------------------------- Note: I am using the Modeler version 7.5.1
asked
Hayder Abood
1 answers
6
The unit testing module says it requires the object handling module as well as certain .jar files ( I assume it comes with them)
Dependencies
- 'ObjectHandling' module
- junit-4.11.jar
- org.apache.commons.io-2.3.0.jar
- org.apache.commons.lang3.jar
- org.apache.httpcomponents.httpclient_4.4.1.jar
- org.apache.httpcomponents.httpcore_4.4.1.jar
Installation
- Import the module in your project (from the Mendix AppStore or by downloading and exporting the module from this project)
- Download the latest 'ObjectHandling' module in your project
- Map the module role 'TestRunner' to the applicable user roles in your application
- Add the 'UnitTestOverview' microflow to your navigation structure or include the 'UnitTestOverview' snippet to a custom page.
- [Optional for including JUnit tests] Set the
UnitTesting.FindJUnitTests
constant to true. (Please take Project settings regarding Cloud Security and Security Constraits in the Mendix Cloud into consideration)
- [Optional for remote unit test run API] Add the 'Startup' flow to your models startup sequence
- [Optional for remote unit test run API] Set the constants
UnitTesting.RemoteApiEnabled
to true
and provide a password to UnitTesting.RemoteApiPassword
- [Optional for remote unit test run API] When hosting in a cloud node or on premise; open a request handler on the
unittests/
path
answered
Marc Lehane