English 中文(简体)
部件测试试验框架
原标题:Test framework for component testing

我期待着一个符合我要求的试验框架。 以下是我在自动测试期间需要采取的步骤:

  • SetUp (There are some input files, that needs to be read or copied into some specific folders.)
  • Execute (Run the stand alone)
  • Tear Down (Clean up to bring the system in its old state)

除此以外,我还想有一些情报,以确保一.cc文档发生变化,所有能够证实变化的试验都应进行。

我正在对PyUnit进行评价,该联盟为此con。 想把这个问题引向正确方向。 您能否提出任何其他测试框架工具? 应考虑哪些其他要求选择正确的测试框架?

最佳回答

阅读本条款后,http://egas fromwithin.com/exploring-the-c-unit-testing-framework-jungle 一段时间前,我参加了Cxx试验。

一旦确定这些物品(例如,需要安装假肢),就非常容易进行笔试(我是全新的单位测试)。

我在工作时将这个项目作为视觉演播室项目纳入我的解决方案。 在试验失败时,它会产生可点击的产出,在我建造解决办法时,这些试验是建造和操作的。

问题回答

Try googletest AKA g 试验,但任何其它单位测试框架都不会更糟,但也可以轻易使用。 并非完全是进行融合测试的工具,但在多数情况下可以轻易应用。 http://en.wikipedia.org/wiki/Release_automation”rel=“noreferer” 网页也可能对你有用。

此处是“g”项目页的样本:

#include <gtest/gtest.h>

namespace {

// The fixture for testing class Foo.
class FooTest : public ::testing::Test {
 protected:
  // You can remove any or all of the following functions if its body
  // is empty.

  FooTest() {
    // You can do set-up work for each test here.
  }

  virtual ~FooTest() {
    // You can do clean-up work that doesn t throw exceptions here.
  }

  // If the constructor and destructor are not enough for setting up
  // and cleaning up each test, you can define the following methods:

  virtual void SetUp() {
    // Code here will be called immediately after the constructor (right
    // before each test).
  }

  virtual void TearDown() {
    // Code here will be called immediately after each test (right
    // before the destructor).
  }

  // Objects declared here can be used by all tests in the test case for Foo.
};

// Tests that Foo does Xyz.
TEST_F(FooTest, DoesXyz) {
  // Exercises the Xyz feature of Foo.
}

平台可安装<代码>。 当这些试验发生变化时,可以利用试验进行安装和播下试验。

我只能补充指出,我们在某些情况下使用“Test”和几乎所有其他内部测试自动化框架。 经常有这样的工具,或许比试图调整和打扫其他部分以满足你们的要求更容易写你的字。

海事组织的一个良好选择,也是我们测试自动化框架的一个内容,它正在使用,加上一个普通例行图书馆(如开办/停机服务、获得某种物品、在某些部件上进行可变的伐木等)。 这使你有一个非常容易使用的灵活制度。 而且,由于它使用的是on子而不是C++,或者像这样,更多的人会忙于制造测试案例,包括QEs,不一定需要能够撰写C++。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签