Giter Club home page Giter Club logo

java-testcase-example's Introduction

java-testcase-example

如果你是Java开发者,这里有大部分的测试供你使用,包括junit、mock、http等测试。欢迎增加~~

作者介绍

源码地址:我的Github地址
作者:吴海旭

项目结构

├── assertj           // assert流式操作
  ├── assertj         // assertj的一些基本操作

├── jmockit           // mock操作
  ├── mock            // jmockit的一些特性
  ├── register        // 基于mock来理解一下在项目中的实际作用

├── junit4            // junit4的一些新特性
  ├── asserts         // junit的基础操作,包括@BeforeClass、@Before、@AfterClass、@After、@Test以及assert 的相关语句
  ├── category        // junit4的新特性-Category
  ├── enclosed        // junit4的新特性-enclosed
  ├── flow            // junit4的整个执行流程分析
  ├── parameterized   // junit4的新特性-参数化parameterized
  ├── rule            // junit4的新特性-rule,定义了一些规则
  ├── suit            // junit4的新特性-suit,可以指定多个测试类一起运行
  ├── theories        // junit4的新特性-theories,可以对测试类需要的参数进行推测,从而提供随机性参数

├── junit5            // junit5的一些新特性(待补充)
  
├── powermock         // mock操作
  ├── mock            // powermock的一些特性
  ├── register        // 基于mock来理解一下在项目中的实际作用
  
├── spring            // spring项目中如何进行测试
  ├── http            // spring项目中使用http来测试结果
  ├── junit4          // spring项目中配合使用junit4来测试service方法以及dao方法
  ├── mock            // spring项目中配合使用mock来测试controller的方法

文章大部分代码都是参考的官方文档,可以自行查看。
推荐文章:
jmockit
powermock-wiki
mockito-javadoc
Assertj官方文档
hotdog
powermock入门介绍及使用案例
使用Powermock实现单元测试,提高单元测试覆盖率

java-testcase-example's People

Contributors

benjaminwhx avatar

Watchers

James Cloos avatar  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.