flexmark-java
flexmark-java copied to clipboard
Documentation for required project setup for tests and benchmarks
I'm attempting to contribute some code changes, but I'd like to make sure they pass all the tests, and ideally I'll add some benchmarks to provide evidence of improved results after my changes.
Unfortunately, after cloning to ~/flexmark-java and running all tests in Intellij, I get 209 failures. I've done effectively zero other setup, but I also haven't been able to find any docs that describe expected contributor setup. Many tests fail with errors like:
java.lang.AssertionError: Resource path: 'C:\com\vladsch\flexmark\test\util\core_formatter_spec.md' not found.
And though I can find and put all test files in those locations by hand, that doesn't seem like it'd be the correct approach. Is there some common Java setup I may be missing (I know Java pretty well, but haven't touched it outside of Android for several years), or are there project-specific things I should be doing?
@Groxx, the path is computed from the package. It appears that there is a bug.
Can you please post the complete stack trace for the error so I can address it.
I will add contributor documentation.
Yep, the full output after a run of "All tests" is here: https://gist.github.com/Groxx/fbffe96d0a1cdae7bed61ec94c7f1381
Just to reiterate, I have no idea if I'm missing some super obvious setup, so do question the basics :) It's cloned into my top-level user folder, opened in Intellij, and I hit "run" - essentially nothing else has been done.
@Groxx, the project uses a maven build and the resource URL to actual file mapping expects a maven directory layout, not IntelliJ.
You should run the tests using something like mvn clean install --settings ~/.m2/settings.xml
I have the IDE project setup to parallel maven build but use the IDE for testing mainly to have easy failed test comparison via the IDE console. For all other builds I use maven from the command line.
I haven't touched the layout AFAIK, unless you mean it must be cloned somewhere specific?
Intellij appears to understand that it's a maven project, I have a maven sidebar and running tests from there gives the same failures (though different output text): https://pastebin.com/nSFjmDwN Or running on "flexmark-java (root)" / seems to be the same as "execute maven goal" -> "mvn test": https://pastebin.com/cmchwtUq
clean + install (and compile, validate, etc) appear to work, just not tests.
Hello I habe the same Issue. I use Intellij, but from Intellij I call Maven tasks. Is there a solution?
+1 , I also met the same problem, who can provide contribution documents or solutions?