amateur
amateur

Reputation: 44605

type of test when simulating a web service call

I call a web service that returns a json string to me.

I would like to test this call by creating a text file with the content of the service call and test against this rather than the actual web service call.

This type of test, is it an integration test or unit test?

Upvotes: 1

Views: 323

Answers (2)

Agent007
Agent007

Reputation: 2750

Well, Integration testing can be thought as testing an aggregation of modules while unit testing is testing the smallest testable part of an application.

And in your case you are not using actual web service as input data but some static data, I am assuming you are doing so just to test if all is going well, this can be thought as Static Testing or Unit testing of the code that utilizes the web service response. Also refer: types of software testing.

Upvotes: 2

Dipak
Dipak

Reputation: 6950

Its unit testing, your intention is to test the functionality "call a web service that returns a json string" only.

To make it integration test, you have to do every single aspects related to that process a real one OR result of actual process. So here you are just testing this with a sample of web service call, to ensure the call.

Upvotes: 0

Related Questions