What is the java unit test library for http?

I am developing a servlet application, I used JWebUnit to check all the basic answers, but now I need to start using other HTTP methods other than GET (POST, PUT and DELETE).

So I found HttpUnit, it looks like I have support for what I need, the POST and PUT methods are available, and I think that I can bypass the DELETE method via HEAD, which is supported by HttpUnit.

However, I found that there is no activity in this project recently; the last issue was about two years ago. so my question is is there any other library that people use for it, or is HttpUnit right for my case?

Thank.

+3
source share
4 answers

Instead, I recommend HtmlUnit. No disrespect for HttpUnit: I used it a few years ago and it worked fine. However, he died as a project for a number of years, and more specifically, he didn't support much Javascript, so I switched to HtmlUnit

HtmlUnit has been growing steadily since its inception and has exceptional Javascript support. I used it to test sites containing a lot of Ajax, and only once, I think, it did not execute the JS code correctly (it turned out that it was an HtmlUnit error that I fixed). There are many hooks available to help you check what is happening.

, , "HtmlUnit " " , Canoo WebTest, JWebUnit, WebDriver, JSFUnit, Celerity,..." , Java, , HtmlUnit .

+2

Httpunit - . , .

+3

@Sasi.

, SVN . , . .

0

REST Assured, HTTP- Java.

0

Source: https://habr.com/ru/post/1756190/


All Articles