English 中文(简体)
选择试验服务模式
原标题:Designing a Pattern to Test RESTful Services

主计长由两个主要部分组成:

  • Mapped URL
  • Code inside method

在撰写测试案件时,有两部分需要测试。

  • Testing URL s and mapping
  • Testing the code inside the function after mapping

采用模拟HttpServletResponse等传统测试案例(而不是使用曲线)是相当可使用的。

问题在于:如何使用、如何使用、如何加以结合,以及是否要求将两个测试部分分开。

用于测试教育、科学和技术服务的各种模式。

最佳回答

首先:

  • Good tests find bugs. (Tests must not find a bug now, they are also good tests when they find a bug some where in the furure while anybody is changing anything.)
  • Bad test did not find bugs. (If a single test never failed, the whole time the project was developed or maintaind, then the test was useless.)
  • And tests never prove that there is no bug!

因此,在我撰写考试时,我试图尽可能轻松地写这些考试,但同时也试图检验我能够错过的每一件事。

例如,贵重机构:

当然,逻辑上可能有许多弊端,因此,需要为这些弊端撰写大量测试。 但是,这些测试可以直接援引这种方法,从而便于其撰写测试。 采用的方法比采用一些吉大港山区发价更为容易。

但无论如何,在吉大港山区的消失中可能会出现错误,因此必须加以测试。 但是,由于我已经用我的正常单位测试了“编码”。 我只需要如此之多的这种难以书写的测试。 而这一试验更多地侧重于错误测绘或错误消化所能做的ug。

www.un.org/Depts/DGACM/index_spanish.htm 因此: 利用你可以撰写的所有测试(Unit Test, Mocked Stuff, HttpUnit test, Selenium,...)。 但首先想一下你想要检验的问题。 选择哪类检验方法,以便你能够撰写和维持这一测试案例。


Btw @see

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签