3

We have written clients in different programming languages (Java, .NET/Silverlight, Flash, Javascript) that communicate with a server, as our target is to support various technologies on client side. The functionality they are supposed to perform is the same.

One of the main challenges we are having now is finding a simple and effective approach for testing this variety of client technologies against the server. Currently we use maven, hooked with many maven plugins such as JSTestDriver, Flexmojo, NPanday and others which we have developed by our own to do this. Is there any better approach?

Any help would be appreciated, whether it is recommendation for available frameworks/tools or innovative ideas to do this.

Thanks

andreadi
  • 1,953
  • 1
  • 20
  • 35
Ali
  • 33
  • 2
  • Be specific on what you mean by server. You mean web servies? – Aravind Yarram Dec 19 '11 at 06:33
  • 1
    Seems like that should be separate fields. Have a unit test and integration test for your API. Have unit tests for each client in the appropriate language/framework/environment, some of which should be run against a live server as part of integration testing. – deceze Dec 19 '11 at 06:41
  • What I mean by server is a server which is capable of taking request from both web browsers as well as standalone clients and responds to them with certain content that is independent from the technology of the client. The server however may execute different codes inside itself for different technologies. For example, it may require to process http headers for browser clients (javascript) but may not necessarily need to do so for Java, .NET and Flash clients. – Ali Dec 19 '11 at 08:55
  • Thanks deceze. And any ideas on what is a good way to put these all together in one testing project to centralize the coding of the tests as much as possible and make the maintenance and expansion as easy as possible? – Ali Dec 19 '11 at 09:01

2 Answers2

7

What you need is a clean design, otherwise everything is a mess and you have to test everything together.

Your server should have an interface with other systems (Browsers, desktop applications, mobile apps) and then test thoroughly this API. You can do that by using the appropriate framework, depending on technology used for the server. This should be your main test effort and then try to keep API stable, so that for every new version of the server you just run a regression test.

Meanwhile you can test the client applications alone by creating a mock server that uses the same API.

Last one would be your integration test where you run a live version of your server and your client application and you run integration tests.

andreadi
  • 1,953
  • 1
  • 20
  • 35
0

expect is a good framework for testing program-external text interfaces such as client-server interaction. It operates with tests formulated in Tcl on a purely black-box logic level.

thiton
  • 35,651
  • 4
  • 70
  • 100