简体   繁体   English

使用Randoop为Spring mvc控制器自动生成Junit类。

[英]Using Randoop to automatically generate Junit classes for Spring mvc controller .

I have a spring mvc web application and I want to automatically generate the junit class for each request handling method defined in my controller.How to use Randoop to generate Junit class that mocks my repository and service class. 我有一个Spring MVC Web应用程序,我想为控制器中定义的每个请求处理方法自动生成junit类。如何使用Randoop生成模拟我的存储库和服务类的Junit类。 I need at least the junit skelton for my controller. 我的控制器至少需要junit skelton。

Randoop does not generate mocks. Randoop不会生成模拟。 You should create any needed mocks. 您应该创建任何需要的模拟。 Then, you can use Randoop to generate JUnit tests. 然后,您可以使用Randoop生成JUnit测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM