1 Star 0 Fork 0

puma0217 / java-maven-junit-helloworld

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Unlicense

java-maven-junit-helloworld

A „Hello World!” sample written in Java using Maven for the build, that showcases a few very simple tests.

This example demonstrates:

  • Unit tests written with JUnit 4
  • Unit test using PowerMockito to mock classes and test System.exit()
  • Integration tests written with JUnit 4
  • Integration test using system-rules to test System.out
  • Code coverage reports via Cobertura
  • A Maven build that puts it all together

Running the tests

  • To run the unit tests, call mvn test
  • To run the integration tests as well, call mvn verify
  • To generate (unit test) code coverage reports, call mvn cobertura:cobertura, and point a browser at the output in target/site/cobertura/

Conventions

This example follows the following basic conventions:

| unit test | integration test --- | --- | --- resides in: | src/test/java/*Test.java | src/test/java/*IT.java executes in Maven phase: | test | verify handled by Maven plugin: | surefire | failsafe

This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to <http://unlicense.org/>

简介

暂无描述 展开 收起
Unlicense
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/puma0217/java-maven-junit-helloworld.git
git@gitee.com:puma0217/java-maven-junit-helloworld.git
puma0217
java-maven-junit-helloworld
java-maven-junit-helloworld
master

搜索帮助