This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Extending internal test-runner by global properties | ||
---|---|---|---|
Product: | java | Reporter: | onmomo <onmomo> |
Component: | JUnit | Assignee: | Victor Vasilyev <vvg> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | CC: | av-nb, mkleint |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
onmomo
2009-09-24 11:59:58 UTC
well, and what is the solution in maven? it seems to me that your projects are not properly setup. either the test file is misplaced and shall be in project B instead of A, or the project A's test classpath is wrong. Or you shall move the test to yet another project C that will depend both the A and B for classpath. It seems to me like you managed to hack something in eclipse (bypassing maven) and require the same from netbeans. (Un)fortunately we just use what maven does. So to configure netbeans, you have to configure maven. Then you have both the command line and maven working.. "..and what is the solution in maven?" I agree with your point of view. The reason why I "hack" eclipse for executing maven test is because, i don't have any other solution.. perhaps you could help me? I've got a hudge component based software powered of a lot independent components. Just one comp(the starter-comp) depends on every other component of the software and is needed to run the whole thing. I wrote a test in one of the components (test-comp), to execute this integration-test, I need a dependency to the starter-comp or the execution will fail. I tried to create a new project (test-project) which depends on "test-comp" and "starter-comp" but this failed, because the test is not in the productive code part of "test-comp" for this reason "test-project" won't see the test. Do you have any solution managing testing with maven for my situation? The requirement is that i can run single test from the subcomponents. I think you have 2 options 1. move the actual test to test-project (as I understood you just created a test project because of classpath but kept the test with the component project, is that right? 2. using jar:test-jar execution (http://maven.apache.org/plugins/maven-jar-plugin/test-jar-mojo.html) create an jar with tests in component project and then in the test project, depend on it using the <classifier> dependency element. That way you get the tests from component project on classpath of the test project. "as I understood you just created a test project because of classpath but kept the test with the component project, is that right?" Not exactely. Testframework: used for starting the application for testing, slim and configurable by Google GUICE, it's used to start the application with the subcomponents which are needed for the tests in Project X. Project A-Starter: Features the whole classpath for my Testframework, knows every subcomponent Project X: A single subcomponent, features "integration-tests" for testing this subcomponent. Starts the Testframework (but this requires additional dependencies to other subcomponents) I need to start the testframework from Project X with the full classpath of Project A-Starter. The classpath of A-Starter would be available in a global property. "as I understood you just created a test project because of classpath but kept the test with the component project, is that right?" Not exactely. Testframework: used for starting the application for testing, slim and configurable by Google GUICE, it's used to start the application with the subcomponents which are needed for the tests in Project X. Project A-Starter: Features the whole classpath for my Testframework, knows every subcomponent Project X: A single subcomponent, features "integration-tests" for testing this subcomponent. Starts the Testframework (but this requires additional dependencies to other subcomponents) I need to start the testframework from Project X with the full classpath of Project A-Starter. The classpath of A-Starter would be available in a global property. I suppose you need to create Project-X-Integration which will depend on Project-TestFramework and Project-A-Starter and will contain the integration tests for for project-X components (and any other project-Y components as well for that matter) Ok thanks a lot for the tips Milos! I'll put all Integration-Test into one module and let maven handle the classpath. |