English 中文(简体)
如何妥善处理人类可读的成果?
原标题:How to properly handle human-readable results?

我正在开发一套基于第2类的测试套件,目的是在不同情况下测试一系列网页(通过任意的XML文件指定)。

产出通过下列方式提供:

  • Some zipped screenshots
  • A raw log file
  • An html file

原始日志文件和标记日志文件( later 用于生成 html) 是通过应用程序中硬编码的信息生成的。

现在我想用一些辅助性数据结构来包含每一个相关的信息, 使用某种公约( 代码, enums, enums, etc. ) 来以后的处理和显示。 如果我没有做错, 这会让代码更容易被操作, 减少冗余 。

我的问题是: " /强 " 对此是否有更好的办法,或普遍接受的做法?

例如产出(只是刮伤)是:

<Test> | <name of page> | <browser>:
    * Searchbox found and query submitted
    * ERROR: timeout while waiting for results
<Test> | <name of page> | <browser>:
    * Question found and answer submitted
    * Alert box content: < ... >
    * OK

谢谢 谢谢

PS:如果任何人拥有更合适的问题标题,

Edit

对不起,如果我的问题不够简洁的话,我尽量说清楚。

换句话说, 当程序要输出大量可能的文本, 以提供有关测试结果的信息时, 我该怎么做? 硬编码信件或者使用某种辅助语言数据结构( 类似一个队列/ 单位) 来跟踪执行开始到结束( 是否错误和状态代码) 之后发生的情况, 然后处理它组成一个可读文件?

最佳回答

使用演示文稿附属数据结构显然是一个更好的选择。 它允许

  • decoupling the testing from the reporting
  • generating several kinds of reports (HTML, PDF, text, etc.)
  • internationalizing the reports
  • integrating the testing into another application which won t do any reporting, but present the result in some GUI component (a tree or a table for example)
问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签