集成测试框架?

发布于 2024-07-18 02:21:18 字数 460 浏览 11 评论 0原文

我正在寻找一个测试框架来涵盖我们的黑盒集成测试。 我们需要一些可由非开发人员编写脚本的东西(也称为不是 C# 单元测试类型的东西)。

我想到的最初方案是:

  1. 恢复已知数据库
  2. 运行 sql 代理作业 (ETL)
  3. 对输出数据库执行验证 sql 脚本

  1. 运行 msi install
  2. 检查文件夹/文件/RegKeys/服务/等是否存在
  3. 运行 msi uninstall

到目前为止,我还没有找到了任何看起来合适的东西。 主要是我们将使用的 UI 测试(Project White/等),但不涵盖这些情况。 或者基于单元测试框架的集成测试,我们还没有准备好推动我们的 QA 团队朝着这个目标迈进。

如果我找不到其他东西,我目前正在尝试使用我们自己的内部工具来进行这部分测试。

I am looking for a test framework to cover our black box integration tests. We need something that is scriptable by non developers (aka not C# unit test type stuff).

The initial scenarios I have in mind are:

  1. Restore known DB
  2. Run sql agent job (ETL)
  3. Execute validation sql scripts against output DB

and

  1. Run msi install
  2. Check existance of Folders/Files/RegKeys/Services/etc
  3. run msi uninstall

So far I have not found anything that seems fitting. Mostly UI testing (Project White/etc) which we will be using but does not cover these cases. Or unit test framework based integration testing which we are not ready to push our QA team towards just yet.

I'm currently experimenting on rolling our own internal tool for this part of testing if I can't find anything else.

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

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

发布评论

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

评论(1

独孤求败 2024-07-25 02:21:18

看起来您想运行一堆命令行参数,对吧?

嗯,我看到有两种方法可以做到这一点:

1)你可以发明自己的领域特定语言。 这是一种奇特的说法,即您编写了一个具有一些非常非常高级的函数的解释器。 非技术人员编写类似批处理文件的内容,然后编写一些 C# 来读取文件、执行 switch 语句,然后运行命令。 FIT 可能是最常见的方法 - 它是集成测试的框架。 ( 方法是用逗号分隔:command,param1,param2。假设这是一个非常简单的汇编程序。然后你的 switch 语句接受 param1..paramx 并将它们粘贴在字符串数组中并将其传递给函数。该函数处理数组。)

这样做的问题是您的客户需要变量。 他们会想要循环。 很快,您就实现了一个完整的编程解释器,可以以列格式读取数据。 臭死了。

所以您可以...

2) 教您的客户一种脚本语言。 我会研究 perl 和 test::more - 或者可能是一些 ruby​​ 测试的东西。

如果这不起作用,也许您可​​以...

3) 放弃让客户创建所有测试。 相反,请一位工具匠与客户配对创建大纲,然后返回并将其转换为代码。

如果您使用浏览器,我建议您使用 selenium 或 watIR,但看起来您是命令行用户。

给我发电子邮件([email protected])或阅读有关测试框架的信息我的博客(xndev.blogspot.com)了解更多信息。 我的博客是询问谷歌什么是测试框架的第二个搜索结果,所以我很乐意推荐它。 :-)

问候,

--heusser

It looks like you want to run a bunch of command-line parameters, right?

Well, I see two ways to do it:

1) you could invent your own domain specific language. That's a fancy way of saying that you write an interpreter with some very very high-level functions. The non-technical people write something like batch files, and you write some C# that reads the file, executes a switch statement, then runs the commands. FIT is probably the most common way to do this - it's the framework for integrated tests. ( The way to do it is to separate things by commas: command,param1,param2. Pretend it's an incredibly simple assembler program. Then your switch statement takes param1..paramx and sticks them in an array of strings and passes that to the function. The function processes the array.)

The problem with this is that your customers will want variables. They'll want looping. And pretty soon, you've implemented a turin-complete programming interpreter that reads in data in columner format. That stinks.

So you could ...

2) Teach your customers a scripting language. I'd look into perl and test::more - or possibly some of the ruby test stuff.

And if that doesn't work, perhaps you could ...

3) Give up on having the customers create all the tests. Instead, have a toolsmith that pairs with the customers to create the outline, then goes back and converts that into code.

If you were driving a browser, I'd recommend selenium or watIR, but it looks like you're command-line-y.

Drop me an email ([email protected]) or read about test frameworks on my blog (xndev.blogspot.com) for more info. My blog is the #2 search result for asking google what's a test framework, so I'm comfortable recommending it. :-)

regards,

--heusser

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