English 中文(简体)
检查单位检测?
原标题:unit tests for screen-scraping?

我是新鲜的,可以进行单位测试,因此,我想得到一些稍感lu的人的意见。

不久我需要撰写一些触觉治疗法。 该目标系统是一个网络大厦,其中牵线搭桥和类似的挥发性。 我从未听说过目标系统的任何变化(例如,目标系统在现场重新设计或以其他方式改变功能)。 因此,我预计我的准则会定期打破。

因此,我认为我的真正问题是,如果我进行单位测试,那么有多少人会担心或处理接口(网站Im报废)的变化?

我认为,单位测试或非单位测试,由于我需要确保Im的消耗数据是原始数据,因此Imm在运行时需要大量测试。 即使我每次操作之前都进行单位测试,在测试和操作时间之间,网络名称仍然会发生变化。

因此,我把重点放在编码测试和例外处理上? 这是否意味着在沙子里划一条线,将这种试验完全排除在单位试验之外?

增 编

最佳回答

单位测试应始终设计成可重复了解的结果。

因此,为了对一台屏幕进行测试,你应撰写针对一套已知的超文本(你可以使用模拟物体来代表这一点)的测试。

你们谈论的是哪类事情与对我进行单位测试的设想一样,如果你想要确保你的法典尽可能有力操作,那么,正如你所说的那样,在编码测试和例外处理方面,情况就更大。

我还将列入一些警示守则,因此,这些系统使你知道,在超文本不按预期分配的情况下,任何情况都会发生。

问题回答

您应尽量将考试分开。 通过模拟浏览器测试执行实际编码的低水平测试数据(即not)。

在模拟浏览器中,确保当你点击 but子、提交表格时以及你跟随联系时发生正确的事情。

从来没有试图检验布局是否正确。

我认为,如果你拥有一个建筑服务器,他们会给你一个不再奏效的早期警报,那么这里的单位测试可能是有益的。 如果网站改变其超文本(因为你可以告诉他们会发生变化的话),你可以撰写一份单位测试文件,证明扫描工作仍然有效。

你也许能够撰写一份单位测试文件,以核实你的努力能够恢复一些有益的东西。





相关问题
run unit tests and coverage in certain python structure

I have some funny noob problem. I try to run unit tests from commandline: H:PROpyEstimator>python src estpython est_power_estimator.py Traceback (most recent call last): File "src est...

How to unit-test an enterprise symfony project?

I´m working on a huge project at my work. We have about 200 database tables, accordingly a huge number of Models, Actions and so on. How should I begin to write tests for this? My biggest problem ...

Code Coverage Tools & Visual Studio 2008 Pro

Just wondering what people are using for code coverage tools when using MS Visual Studio 2008 Pro. We are using the built-in MS test project and unit testing tool (the one that come pre-installed ...

Unit testing. File structure

I have a C++ legacy codebase with 10-15 applications, all sharing several components. While setting up unittests for both shared components and for applications themselves, I was wondering if there ...

Unit Testing .NET 3.5 projects using MStest in VS2010

There s a bug/feature in Visual Studio 2010 where you can t create a unit test project with the 2.0 CLR. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=483891&wa=...

Unit Test for Exceptions Message

Is there a simple (Attribute-driven) way to have the following test fail on the message of the exception. [TestMethod()] [ExpectedException(typeof(ArgumentException))] public void ExceptionTestTest() ...

热门标签