How do you unit test Java EE code?

前端 未结 4 1794
误落风尘
误落风尘 2021-01-31 18:26

I want to ask for your prefered way to test Java EE code?

I found only three project, that are trying to help to code unit tests in Java EE environment:

  • ht
4条回答
  •  佛祖请我去吃肉
    2021-01-31 18:39

    I had a requirement to test a CDI application and wrote a custom JUnit runner that runs everything outside of the web container.

    http://jglue.org/cdi-unit/

    It is suitable for Java SE and also supports dummy Request, Session and Conversation scopes for testing web apps.

    It's small and fast, which is great when you have lots of unit tests.

提交回复
热议问题