简体   繁体   English

使用服务器测试不同编程语言的客户端的最佳方法是什么?

[英]What is the best way to test clients of different programming languages with a server?

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. 我们用不同的编程语言(Java,.NET / Silverlight,Flash,Javascript)编写了与服务器通信的客户端,因为我们的目标是在客户端支持各种技术。 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. 目前我们使用maven,连接了许多maven插件,如JSTestDriver,Flexmojo,NPanday以及我们自己开发的其他插件。 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 谢谢

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. 您的服务器应该具有与其他系统(浏览器,桌面应用程序,移动应用程序)的接口,然后彻底测试此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. 这应该是您的主要测试工作,然后尝试保持API稳定,以便对于每个新版本的服务器,您只需运行回归测试。

Meanwhile you can test the client applications alone by creating a mock server that uses the same API. 同时,您可以通过创建使用相同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. 最后一个是您的集成测试,您可以在其中运行服务器和客户端应用程序的实时版本,并运行集成测试。

expect is a good framework for testing program-external text interfaces such as client-server interaction. expect是测试程序外部文本接口(如客户端 - 服务器交互)的良好框架。 It operates with tests formulated in Tcl on a purely black-box logic level. 它采用Tcl在纯黑盒逻辑级别上进行的测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM