有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java使用客户端测试rest服务

我是一个老派的程序员,在我的项目中没有真正使用测试。我现在想改变这一点,但由于这不是一个工业项目,而是我自己的项目,我想问:

使用客户端测试我的Rest服务有问题吗

为什么我需要编写一个单元测试来测试rest后端,然后在我可以扩展客户端的情况下编写一个客户端

测试语言和实现语言是否有相同的约定?我说的是Java rest和JS客户端

我认为这将使我的方法更加灵活和快速


共 (1) 个答案

  1. # 1 楼答案

    Why would I need to write a unit test to test the rest backend and then write a client when I can just extend the client?

    基本上,在测试用例中,您可以测试所有内容,而客户端可能只使用接口的一个子集,并且永远不会遇到可能的错误

    Is there any convention that the testing language should be the same as the implementing language ?

    没有。但是有非常好的工具(甚至是自动生成)可以捕捉到JavaIDE,Selecting java Automation testing tools for web application