工作流系统中的单元/自动化测试 [英] Unit/Automated Testing in a workflow system

查看:36
本文介绍了工作流系统中的单元/自动化测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您是否在像 K2 这样的复杂工作流系统上进行自动化测试?

Do you do automated testing on a complex workflow system like K2?

我们正在构建一个在 Sharepoint 2007 和 K2 之间进行广泛集成的系统.我什至无法想象从哪里开始自动化测试,因为工作流程涉及多个用户与 Sharepoint、K2 工作流程和自定义网页进行交互.

We are building a system with extensive integration between Sharepoint 2007 and K2. I can't even imagine where to start with automated testing as the workflow involves multiple users interacting with Sharepoint, K2 workflows and custom web pages.

有没有人在像 K2 这样的工作流服务器上做过自动化测试?付出的努力比值得的多吗?

Has anyone done automated testing on a workflow server like K2? Is it more effort than it's worth?

推荐答案

我在测试工作流繁重的基于 MOSS 的应用程序时遇到了类似的问题.我们案例中的工作流程基于 WWF.

I'm having a similar problem testing workflow-heavy MOSS-based application. Workflows in our case are based on WWF.

我的想法是模拟几乎所有您无法从单元测试中控制的东西 - 文档存储、身份验证、用户权限和操作、sharepoint 工作流的特定于共享点的部分(这些模拟应该经过彻底测试以反映真实组件).

My idea is to mock pretty much everything that you can't control from unit tests - documents storage, authentication, user rights and actions, sharepoint-specific parts of workflows for sharepoint (these mocks should be thoroughly tested to mirror behavior of real components).

您使用控制反转让代码选择在运行时使用哪个组件 - 真实的或模拟的.

You use inversion of control to make code choose which component to use at runtime - real or mock.

然后您可以编写系统范围的测试来测试工作流行为 - 设置您自己的环境,检查工作流引擎的反应.这些测试太大了,不能称之为单元测试,但它仍然是自动化测试.

Then you can write system-wide tests to test workflows behavior - setting up your own environment, checking how workflow engine reacts. These tests are too big to call them unit-tests, still it is automated testing.

这种方法似乎适用于琐碎的情况,但我仍然需要证明它值得在实际工作流程中使用.

This approach seems to work on trivial cases, but I still have to prove it is worthy to use in real-world workflows.

这篇关于工作流系统中的单元/自动化测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆