I have libraries imported JUNIT 4.12 and Hamcrest 1.3 and test folder setup. Sources pointing to the right test package folder. I would run test with Shift+F6 for each Java test file and it would execute all tests in that java file. After a restart of my computer, I followed same procedure to run tests only to get "No tests executed". What could be the reason and solution.
package test1;
import hello.*;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class hellotest {
private jj j1;
@Before
public void runBeforeEachTest(){
j1 = new jj();
j1.setName("cur");
j1.setComp("goo");
}
@Test
public void testProp(){
String name = j1.getName();
String cmp = j1.getComp();
assertEquals("cur", name);
assertEquals("goo", cmp);
}
}
Same project without any modification works fine on another computer. Trying to re-install Netbeans 8.2 , but it does not uninstall , it gives error "Java SE Development Kit(JDK) was not found on this computer" JDK 6 is required for uninstalling the Netbeans IDE. This is strange since to install NetBeans 8.2 JDK 8 is installed but during uninstallation JDK 6 it is looking for. Question is how to uninstall Netbeans?
Well, you have to right click your project and Test. The same tool is located on the navigation bar Run / Test Project (project) since you have selected a project as active.
You can either use the keyboard shortcut Alt + F6. Your shortcut using Shift is wrong and I have no idea what it should do (check the Options).
This guarantee to start all the tests. You can either create your test suite defining the "pack" of test instances.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With