“分布式单元测试”的框架或工具?

发布于 2024-08-29 07:57:28 字数 1539 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

上课铃就是安魂曲 2024-09-05 07:57:28

测试分布式软件很大程度上取决于软件的类型,因此为了获得完整的答案,我需要知道您的软件的用途。然而,看看 PNUnit,它所做的大部分工作都是允许测试的同步、排序和并行执行。 TestNG 也支持这一点,例如,您可以这样做:

@Test(threadPoolSize = 3, invocationCount = 10,  timeOut = 10000)
public void testServer() {
   :
}

这将调用从三个不同的线程运行 testServer 十次。 TestNG 4.5 的更改日志还暗示了运行远程测试的可能性,更多信息可在 中找到这篇博文。

或者,您可以查看 IBM 的 ConTest 软件,用于测试并行和分布式软件(有一个很棒的软件)关于如何使用它的描述此处)。我使用它来暴露并发应用程序中的错误取得了巨大的成功。

Testing distributed software depends greatly on what type of software it is, so for a complete answer I will need to know what your software does. However looking at PNUnit it seams that most of what it does is allow for synchronization, ordering and parallel execution of tests. TestNG also supports this, for instance, you can do:

@Test(threadPoolSize = 3, invocationCount = 10,  timeOut = 10000)
public void testServer() {
   :
}

which will invoke the function testServer ten times from three different threads. The change-log of TestNG 4.5 also hints at the possibility of running remote tests, more info is available in this blog post.

Alternatively you can checkout IBM's ConTest software for testing parallel and distributed software (there is a great description of how to use it here). I have had great success using it to expose bugs in my concurrent applications.

前事休说 2024-09-05 07:57:28

那么,有一种方法非常简单,不需要学习任何新的框架。您可以使用 grep4j 测试分布式环境中的应用程序生成的日志。
看看这里此处了解更多信息。

Well, there is a way which is very simple and does not require to learn any new framework. You can test the logs produced by the applications across your distributed environment using grep4j.
Have a look here and here for more info.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文