Reputation: 8730
I am trying to create some unit test for scout client elements.
I have template for AbstractGroupBox
, let say AbstractMyBox
.
I see that I need to have ScoutClientTestRunner
for this, so I create simple example :
@RunWith(ScoutClientTestRunner.class)
public class MyyBoxTemplateTest {
AbstractMyBox box;
@Before
public void createTemplate() throws Exception {
box = new AbstractMyBox() {};
}
@After
public void destroyTemplate() throws Exception {
box = null;
}
@Test
public void testTitle() {
String title = box.getLabel();
assertEquals(title, TEXTS.get("Something"));
}
}
When I run Unit test with JUnit Plug-in test
it open new eclipse window
and clock is spinning, inside JUnit component it said Runs: 0/0
What am I doing wrong?
Marko
Upvotes: 1
Views: 100
Reputation: 9497
Your problem has nothing to do with Eclipse Scout. The following applies for every Eclipse bundle project (using Plug-in Development Environment (PDE) in your Eclipse IDE).
When your run a Test using “Run as > JUnit Plug-in Test”, all plug-ins in your workspace are started.
You can check this by opening the corresponding “Run Configuration”
To reduce the set of started plug-ins, you should do the following:
Your test should now run, and no second eclipse workbench should be opened.
Depending on your setup (workspace, team, source control...), it might be usefull to save this as launcher file and to share it with your team. (see the options in the “Commons” tab).
Upvotes: 1
Reputation: 8730
I have wrong run-configuration settings.
Under Run-Configuration / Main / Program to Run I need to set Run an Application : [No Application] - Headless Mode
Upvotes: 0