This repository contains a test and exploratory usage of javaparser for the detection and contents of test methods.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Johannes Wuensche e879f5a7e9
Detect methods which use the @Test Annotation
3 months ago
src/main Detect methods which use the @Test Annotation 3 months ago
.gitignore Upgrade dependency 10 months ago
.travis.yml switch to openjdk8 (from oraclejdk8) 6 months ago
README.md Detect methods which use the @Test Annotation 3 months ago
pom.xml Merge pull request #10 from javaparser/dependabot/maven/com.github.javaparser-javaparser-core-3.15.21 6 months ago

README.md

The goal of this example project is to find usage of test annotations in the test files and print out the names of the annotated functions.

JavaParser and Maven sample

A fully working sample Maven project that parses and generates code with JavaParser

This is targeted at people without Maven experience.

To build it, you will need to download and unpack the latest (or recent) version of Maven (https://maven.apache.org/download.cgi) and put the mvn command on your path. Then, you will need to install a Java 1.8 (or higher) JDK (not JRE!), and make sure you can run java from the command line. Now you can run mvn clean install and Maven will compile your project, an put the results it in two jar files in the target directory. If you like to run from the command line, execute java -jar target/javaparser-maven-sample-1.0-SNAPSHOT-shaded.jar.

How you run this code is up to you, but usually you would start by using an IDE like NetBeans, Intellij IDEA, or Eclipse.

The Maven dependencies may lag behind the official releases a bit.

If you notice some problems with this setup, please open an issue.