Sublime Forum

Clicking JUnit test failues w/ Build System

#1

I have Junit running as a build system in sublime text. I would like to make it so when I click on a test name it takes me to the file/line containing the test. file_regex and line_regex don’t really seem to do the trick.

The Junit output looks like:

JUnit version 4.12
.E
Time: 0,007
There was 1 failure:
1) evaluatesExpression(CalculatorTest)
java.lang.AssertionError: expected:<6> but was:<-6>
  at org.junit.Assert.fail(Assert.java:88)
  ...

FAILURES!!!
Tests run: 1,  Failures: 1

There is no file path listed just the class name CalculatorTest and the test name evaluatesExpression. Maybe a new regex could be added to the build system that returns the entity/method?

entity_regex: \d+\) (\w+)\((\w+)\)

Thoughts?

0 Likes