更新时间:2023-02-17 08:33:43
在内部,我们使用Jenkins以及TeamCity。
Internally, we use Jenkins as well as TeamCity.
我们有两种类型的测试:
We have two types of tests:
src
目录: main
和 test
。例如:如果您查看iText核心,您将找到已发布的内容这里和测试这里。大多数这些测试都建立在我们的 testutils 。 @WrapToTest
注释。好吧,实际上涉及的更多:在编写样本时需要遵循特定的模式:始终使用 SRC
和 DEST
对于源PDF和生成的PDF,总是使用 createPdf()
或 manipulatePdf()
方法,并始终给出cmp文件名与 DEST
文件同名,前缀为 cmp _
。src
directory with 2 sub directories: main
and test
. For instance: if you look at iText core, you'll find the released stuff here and the tests here. Most of these tests are built on top of our testutils.@WrapToTest
annotation. Well, actually there's more involved: you need to follow a specific pattern when writing a sample: always use SRC
and DEST
for source PDFs and resulting PDFs, always use a createPdf()
or manipulatePdf()
method, and always give the cmp file the same name as the DEST
file prefixed with cmp_
.在这两种情况下,您都可以找到名称以 cmp _
开头的PDF文件,例如参见 cmpfiles文件夹。在这两种情况下,您都会找到对Ghostscript和比较工具的引用(您需要配置它们)。
In both cases, you'll find PDF files of which the name starts with cmp_
, see for instance the cmpfiles folder for the examples. In both cases, you'll find references to Ghostscript and a compare tool (you'll need to configure these).