Giter Club home page Giter Club logo

fast-spring-test's Introduction

Languages: English | 中文

fast-spring-test

The unit test speed-up tool draws on spring test's support for integration testing, so that unit tests can also reuse the spring container without restarting the spring container to achieve the purpose of rapid unit testing. It supports multiple test engines junit4, junit5, testNG, etc.

Architecture

Architecture

Effects

2024-01-18.21.27.18.mov
  • The first run requires starting the running environment, which takes a long time. After the second run, the container can be reused, and the unit test execution time can be down to the millisecond level. There is no need to restart when adding a single test case. The test can be hot loaded and executed directly.

Getting started

Maven dependency

<properties>
    <fast.spring.test.version>1.0.2</fast.spring.test.version>
</properties>

<dependencies>
    <dependency>
        <groupId>cn.net.fasttest</groupId>
        <artifactId>fast-spring-test</artifactId>
        <scope>test</scope>
        <version>${fast.spring.test.version}</version>
    </dependency>
</dependencies>

Add test entry

public class FastSpringApplicationTests {

  @Test
  public void test() {

    System.out.println("test...");
    Assertions.assertTrue(true);
  }

  public static void main(String[] args) {
    FastSpringTest.run();
  }
}

IDE run FastSpringApplicationTests, execute the following command to start testing

# run com.xx.class#method
run cn.net.fasttest.FastSpringApplicationTests#test
# or
cn.net.fasttest.FastSpringApplicationTests#test

Contributing

  • We welcome and encourage you to contribute to our projects. If you have any questions, suggestions, or want to contribute code, please contact us via email, GitHub issues, or submit a PR directly. Your participation will make this project even better!

Reporting bugs

License

fast-spring-test is under the Apache 2.0 license. See the Apache License 2.0 file for details.

fast-spring-test's People

Contributors

liubingmx avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.