GithubHelp home page GithubHelp logo

test-splitter's Introduction

Test-Splitter

This project aims to split complex JUnit tests into parts for various purposes.

Current Status Report

How to Run

Option Functionality
-p Path to test file
-c (optional) Target class name that includes the methods to be splitted. All the test class files will be processed by default.
-t (optional, repeated) Target method name(s) to split. All methods with (@Test) annotation will be processed by default.
-s (optional, repeated) Split points (method names). All method calls in the test function will be considered as split point.
-a Enabling splitting in assertions rather than method calls.
mvn compile exec:java -Dexec.mainClass="com.od.TestSplitter.TestParser" -Dexec.args="<arguments>"

Path should be given in Unix style in all platforms  
 

BankAccount Example

The original tests will be @Before function of the generated test class.

  • Splitting the test from specific methods
 mvn compile exec:java -Dexec.mainClass="com.od.TestSplitter.TestParser" \
     -Dexec.args="-p ./src/main/java/org/od/TestSplitter/Samples/ \
     -c BankAccountTest -t testS0 -s withdrawMoney -s addMoney"
  • Splitting the test from all assertions
 mvn compile exec:java -Dexec.mainClass="com.od.TestSplitter.TestParser" \
     -Dexec.args="-p ./src/main/java/org/od/TestSplitter/Samples/ -c BankAccountTest -t testS0 -a"
  • Splitting the test from all methods
 mvn compile exec:java -Dexec.mainClass="com.od.TestSplitter.TestParser" \
     -Dexec.args="-p ./src/main/java/org/od/TestSplitter/Samples/ -c BankAccountTest -t testS0"

test-splitter's People

Contributors

oguzdemir avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.