Skip to content

Generates tests for the specified methods using symbolic executions

License

Notifications You must be signed in to change notification settings

JavaUnchained/AutoTestIntelijPugin

Repository files navigation

autotest-plugin

Build

Installation

  1. Need to have JDK 1.8 only.
  2. Change Intellij IDEA version to 2019 (or lower, 2019.3.4 is recommended);
  3. Download the latest release and install it manually using Preferences > Plugins > ⚙️ > Install plugin from disk...;
  4. Change Intellij IDEA runtime. You need install Runtime plugin and download JDK - Runtime version 1.8.0_252 -1649 relese amd64;
  5. Build cmd-jbse project or donwload compiled JBSE JAR file;
  6. Dowloads modified JBSE project from this repo or download and unzipping this archive;
  7. Download and compile Z3 pathresolver;
  8. Open tesable project and go to ⚙️ Settings -> Other -> AutoTest Settings and specify all the required paths (path to JBSE project, path to JBSE jar, path to Z3 solver and path to JRE (1.8 only);
  9. Click on the right mouse button on the desired class and click on "Create test"
  10. Wait until you see a message that the generation was successful. Notifications in progress are visible at the bottom left.

Requirements and restrictions

For the project under test, you must have a compiled test class. If you testing Example.java then you need to have Example.class. The compiled classes must also follow one of the following paths: "/out" for simple java projects, "target/classes" for maven projects and "build/classes" for Gradle project ( these are usually the default outputs). This is necessary for searching for descriptors and for javassist to work.

About

Generates tests for the specified methods using symbolic executions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published