与White进行集成测试

与White进行集成测试

问题描述:

有人有没有使用过白色框架的经验?

Has anyone got experience with the white framework?

www.codeplex.com/white 吗?

我正在考虑将其用于下一个项目,以对Windows客户端进行基本的烟雾测试.我想要有关文章或您自己的经历的一些建议.谢谢.

I'm thinking about using it for the next project for basic smoke tests of our windows client. I'd like some advice on articles or your own experiences. Thanks.

我最近使用白色工具为相当复杂的WinForms应用程序构建了一些(20+)UI测试,该应用程序具有大量的UserControls,动态创建的和第三方控件.

I recently used white to build a few (20+) UI tests for a fairly complex WinForms app with plenty of UserControls, dynamically created and 3rd-party controls.

这是我的印象:

  • 使用起来非常简单直观.
  • 几乎没有质量问题.
  • 这是一个年轻的项目,所以有 一些缺少的功能,但它们已经 了解了基础知识.
  • 有时,如果控件没有已知的AutomationID,我将不得不使用击键来导航和操作控件(例如制表符,选项卡,输入"),这实在太可惜了,但仍然非常麻烦容易做到白色.这通常仅发生在第三方或动态生成的控件中.
  • 怀特的录音机很有帮助(实际上会为您生成代码),但经常会因复杂或异常的控件而感到困惑.因此,我建议您...
  • ...将UISpy留在附近,以便您可以查看正在使用的控件的AutomationID.
  • 最后,如果您像我一样,希望建立一些自动化测试.这可能很棘手,因为自动化测试通常将由CI工具(如CruiseControl)运行,该工具作为Windows服务运行,因此没有活动的图形环境(Windows会话)……白色需要这样做. 建议方式解决方法是使用虚拟机.这是我失去动力的地方,因为我的工具链对于我的目的来说变得太大了:CruiseControl-> NAnt-> NUnit-> white +虚拟机.
  • Very easy and intuitive to work with.
  • Little or no quality issues.
  • It's a young project so there are some missing features, but they've got the basics covered.
  • Occasionally, if a control didn't have a known AutomationID, I was forced to use keystrokes to navigate to and manipulate a control ("tab, tab, enter" for example) which was kind of a bummer, but still very easy to do in white. This usually only happened with 3rd-party or dynamically generated controls.
  • White's recorder is helpful (and will actually generate code for you) but does often get confused by complicated or unusual controls. For that reason I'd recommend that you...
  • ...keep UISpy nearby so you can see the AutomationID of the controls you're working with.
  • And finally, if you're like me, you're hoping to set up some automated tests. This can be tricky since an automated test will usually be run by a CI tool such as CruiseControl which runs as a Windows service, which therefore has no active graphical environment (Windows session)...which white requires. The suggested way around this is to use a virtual machine. This is where I lost steam, as my tool chain had just grown too large for my purposes: CruiseControl->NAnt->NUnit->white + virtual machine.

无论如何,希望有用.