tratto
tratto

Reputation: 252

Testing web pages using Java

I am looking for java tests that I can use in automation testing of web pages hosted locally.

These are for RESTful web services.

The situation is we have some web pages or web service hosted locally and I need to run several tests on this.

Upvotes: 0

Views: 319

Answers (3)

sid
sid

Reputation: 98

You can use the URL class in Java: http://docs.oracle.com/javase/7/docs/api/java/net/URL.html

I feel that you don't need to use Selenium as the REST calls you will be making are independent of the browser. You don't need an actual browser to make these calls. If you do that, your automation will run a lot faster.

If you also have an authentication and authorization service then you will need to take care of it using the Set-Cookie HTTP header.

Upvotes: 0

pavel_kazlou
pavel_kazlou

Reputation: 2046

Selenium for webpages, soapUI for RESTful web services.

Upvotes: 1

sjr
sjr

Reputation: 9895

Maybe Selenium? You can use it to drive a web browser to browse through your pages. You can use Java code to make assertions about what the page looks like after you do certain things (click a button, type some text, etc).

Upvotes: 5

Related Questions