Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jahidiul Islam
7,352 PointsTest is not detected when I try "Run All Tests"
Hi,
I have a different version of IntelliJ which community 2017.3
when I try to run the tests with "Run All Tests", it seems like the test is not found by IntelliJ as it's showing the following result:
0 test classes found in package '<default package>'
Process finished with exit code 254
Empty test suite.
Here is my Test file:
package com.teamtreehouse.vending;
import org.junit.Test;
import static org.junit.Assert.*;
public class CreditorTest {
@Test
public void refund() {
fail();
}
}
2 Answers
Doli Harahap
6,246 PointsHave you moved your test Class to separate "test" folder" If yes, then try to Mark your "test" folder as Root of Test Source by right clicking the folder -> Mark Directory as -> Test Source Root
Jahidiul Islam
7,352 PointsMy Bad, I accidentally created some sort of Test annotation in my src folder and my test file was referencing that. That's why it didn't run. I've found that by doing some digging. Everything is fine now. Thanks everyone for the help.