user6941415
user6941415

Reputation:

What's the difference between UI-Test and Rest?

I got this question while interviewing some companies. I don't think I answer the question well. However, based on my understanding:

The UI level testing is more about the what end user will see and would be better to use for acceptance testing.

The Rest test is good for performance testing, since it's easier to simulate multiple users to access the resource at the same time. And, it's easier to look at where the problem will be.

Can anyone give me more detail about that? And when should we choose to use which type of testing?? Thanks a lot.

Upvotes: 3

Views: 243

Answers (2)

rad
rad

Reputation: 1937

UI testing is testing the interface. This tests have high failing rate and are harder to maintain. In the context of your interview if you are talking about BDD that means that your scenarios are executed from the UI (and they are not only testing the UI), this tests run as black box test.This scenarios could be ran with selenium steps (if your app is a web app).

In the other case, the scenarios are executed at the api level, calling your controller actions for example rather than the interface, the test is still a black box but at a lower level. From my experience it's better to write at this level when possible.

Mike Cohn pyramid is a good indicator of what kind of testing your system should have (few UI tests, some Service Tests and plenty of unit tests)

Upvotes: 1

RaM PrabU
RaM PrabU

Reputation: 445

UI TESTING-- is not a type of testing. It means testing the UI part of your application. (i.e) whether the flow of UI/UX is working properly or not.

REST TESTING -- is different each time you perform a operation some REST call will be send to the server. In return the server will send back a xm/json or other kind of data-file according to the request. (i.e) testing whether the data returned from the server is correct or not

Upvotes: 0

Related Questions