1 Star 0 Fork 7

李梓萌 / PICT

forked from Gitee 极速下载 / PICT 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Pairwise Independent Combinatorial Testing

PICT generates test cases and test configurations. With PICT, you can generate tests that are more effective than manually generated tests and in a fraction of the time required by hands-on test case design.

PICT runs as a command line tool. Prepare a model file detailing the parameters of the interface (or set of configurations, or data) you want to test. PICT generates a compact set of parameter value choices that represent the test cases you should use to get comprehensive combinatorial coverage of your parameters.

For instance, if you wish to create a test suite for partition and volume creation, the domain can be described by the following parameters: Type, Size, File system, Format method, Cluster size, and Compression. Each parameter has a limited number of possible values, each of which is determined by its nature (for example, Compression can only be On or Off) or by the equivalence partitioning (such as Size).

Type:          Single, Span, Stripe, Mirror, RAID-5
Size:          10, 100, 500, 1000, 5000, 10000, 40000
Format method: Quick, Slow
File system:   FAT, FAT32, NTFS
Cluster size:  512, 1024, 2048, 4096, 8192, 16384, 32768, 65536
Compression:   On, Off

There are thousands of possible combinations of these values. It would be difficult to test all of them in a reasonable amount of time. Instead, we settle on testing all possible pairs of values. For example, {Single, FAT} is one pair, {10, Slow} is another; one test case can cover many pairs. Research shows that testing all pairs is an effective alternative to exhaustive testing and much less costly. It will provide very good coverage and the number of test cases will remain manageable.

More information

See doc/pict.md for detailed documentation on PICT and http://pairwise.org has details on this testing methododology.

The most recent pict.exe is available at https://github.com/microsoft/pict/releases/download/release/pict.exe.

Contributing

PICT consists of the following projects:

  • api: The core combinatorial engine,
  • cli: PICT.EXE command-line tool,
  • clidll: PICT.EXE client repackaged as a Windows DLL to be used in-proc,
  • api-usage: A sample of how the engine API can be used,
  • clidll-usage: A sample of how the PICT DLL is to be used.

Building and testing on Windows with MsBuild

Use pict.sln to open the solution in Visual Studio 2019. You will need VC++ build tools installed. See https://www.visualstudio.com/downloads/ for details.

PICT uses MsBuild for building. _build.cmd script in the root directory will build both Debug and Release from the command-line.

The test folder contains all that is necessary to test PICT. You need Perl to run the tests. _test.cmd is the script that does it all.

The test script produces a log: dbg.log or rel.log for the Debug and Release bits respectively. Compare them with their committed baselines and make sure all the differences can be explained.

There are tests which randomize output which typically make it different on each run. These results should be masked in the baseline but currently aren't.

Building with clang++ on Linux, OS/X, *BSD, etc.

Install clang through your package manager (most systems), Xcode (OS/X), or from the LLVM website. On Linux, you also need to install recent GNU's "libstdc++" or LLVM's "libc++".

Run make to build the pict binary.

Run make test to run the tests as described above (requires Perl).

Debugging

Most commonly, you will want to debug the command-line tool. Start in the pictcli project, cli/pict.cpp file. You'll find wmain routine there which would be a convenient place to put the very first breakpoint.

Pairwise Independent Combinatorial Testing Copyright (c) Microsoft Corporation. All rights reserved. MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

PICT(Pairwise Independent Combinatorial Testing,结对独立组合测试)是一个测试用例生成工具,它可以生成测试用例和测试配置,其理论基础是 展开 收起
C/C++
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/li-zimeng/PICT.git
git@gitee.com:li-zimeng/PICT.git
li-zimeng
PICT
PICT
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891