How to make sure web services are stable from one release to another?

The company I work for is a software provider with a suite of applications. There are also a number of web services, and, of course, they must remain stable, even if the applications change. We did not always deal with this, and sometimes the client discovers that the service does not behave as before after the update.

Now we want to deal with this better. In general, web services should not change, and if they need them, at least we will learn about it and document this change.

But how do we guarantee this? One idea is to compare WSDL files with previous versions in each version. This will make sure that the interfaces are not changed, but does not detect that the behavior is changing, for example, if an error is entered in some shared library.

Another idea is to create a set of service tests, for example, using soapUI. But then we will never know if we have covered enough cases.

What are some guidelines for this?

+4
source share
3 answers

I think you can definitely be sure of the stability of the services. If you keep updating your test tests with the latest changes in the service, and I think this is one of the best practices that people use before deploying.

In addition, in general, I think it probably matters how well unit testing is done by developers who write the components (libraries) used by services. Are these unit tests updated with changes to the components used by the service.

+2
source

There are two kinds of changes for a web service, violation of changes and inextricable change. Breaking changes is like changing the signature of a web method or changing the datacontract schema. An inextricable change is like adding a new web method or adding an optional member to a datcontract. In general, your client should continue to work with constant changes. I don't know what technology you are using, but use versioing in the service namespace and datacontract namespace after the W3C recommendation . You can even continue to post different versions at different endpoints. This way your clients will break if they try to use the new version of your service without regenerating the proxy from the new version of WSDL or continuing to use the old version.
Some links to WCF http://msdn.microsoft.com/en-us/library/ms731060.aspx http://msdn.microsoft.com/en-us/library/ms733832.aspx

I would not consider behavior change as a change in the meaning of SOA. This is more like fixing defects.

+2
source

IMO, in addition to monitoring WSDL for changes (which is really necessary only if you have a strategy of involving involuntarily ("promotion in production"), the only way to really ensure that everything is workable and stable is continuous, automatic, periodic, functional testing with a test suite that provides full coverage of both WSDL and the basic functionality of the application, including edge cases.The test cases should be versioned in the same way as location and WSDL, and should be developed in parallel with new versions of the application (and not after that, as a reaction). All this can be automated using SoapUI. Ideally, the results of logging can be accumulated and reported somewhere on some information panel, so if somethign breaks, you know when it broke, and hopefully compare this with an event, for example, with an application update or with something more benign, for example, with a service pack, pushing, performing electrical work, etc. However ... do as I say, not like me. I could not succeed in this strategy. Your voices will tell me if I need to move harder or do something else!

+1
source

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


All Articles