-1

I would like to ensure that our webservice works but I don't know how to do it because webservices data are controlled by a backoffice and data changes everyday multiple times.

The data loaded by the webservice doesn't come from a database but from json files dynamically loaded and distributed. I've considered replacing those files for testing the behavior, but bad data are a common frequent cause of disfunction, so I would rather tests those simultaneously or at least have some way to ensure that data are valid for the currently deployed sources.

I would also welcome suggestions of books too.

Emmanuel Caradec
  • 2,302
  • 1
  • 19
  • 38
  • `I've considered replacing those files for testing the behavior, but bad data are a common frequent cause of disfunction,` so you got problem with data, not behaviour? Or both? – Marcin Orlowski Jul 03 '15 at 09:02
  • It's both. There are only a few unit test and they only cover a small part of the application, so the behaviour is a issue. Data are generated by a backoffice which can also be wrong or output incorrect data. Incorrect output of data can be caused by behaviour issues of the backoffice (because of missing tests ) or because of specification issues between the front end and the backend (the format is a new incompatible version ) – Emmanuel Caradec Jul 03 '15 at 09:07

1 Answers1

1

This is a big problem and it is difficult to find a single solution. Instead you should split task into smaller sub tasks:

  1. Does web service work at all? Connect to it and make normal operations. If you are using real data, you cannot verify that it is correct. Just check you get a valid looking reply. You should also have a known set of data in a different server, maybe call it staging. Here you can verify that a new version web service gives out correct output.
  2. How to check that files you get from backoffice are valid? It is not efficient to make you test them just before deployment. You mentioned several reasons why this is not possible so you have to live with it. Because your files are json, it should be possible to write a test suite that checks their validity.
  3. How to check that real json files give out correct output in web service. This is your original question. You have a set of json files. How easy it is to calculate what web service responds based on these files? In some cases you would need to write your own web service engine. This is why testers usually do first two steps first.
Pekka
  • 2,175
  • 15
  • 20