Pairwise Independent Combinatorial Tool
Перейти к файлу
Sumit Bhardwaj 555d2d4273
Enable warnings as error and W4 on MSVC (#83)
This commit increase warning level from `W3` to `W4` on MSVC and sets
warnings as errors. Exclusion is made for a specific warning (C4189).
2022-03-30 14:21:01 -07:00
.github/workflows Adding building using CMake (#81) 2022-03-29 14:30:20 -07:00
api Enable warnings as error and W4 on MSVC (#83) 2022-03-30 14:21:01 -07:00
api-usage Enable warnings as error and W4 on MSVC (#83) 2022-03-30 14:21:01 -07:00
cli Enable warnings as error and W4 on MSVC (#83) 2022-03-30 14:21:01 -07:00
clidll Enable warnings as error and W4 on MSVC (#83) 2022-03-30 14:21:01 -07:00
clidll-usage Adding building using CMake (#81) 2022-03-29 14:30:20 -07:00
doc Add alias for max order (#77) 2022-02-15 20:27:28 -08:00
test Adding building using CMake (#81) 2022-03-29 14:30:20 -07:00
.gitignore fixbug34 (#42) 2020-05-03 19:01:28 -07:00
CMakeLists.txt Enable warnings as error and W4 on MSVC (#83) 2022-03-30 14:21:01 -07:00
LICENSE.TXT Initial commit of the codebase. 2015-10-16 10:00:07 -07:00
Makefile Compiler warnings fix (#64) 2021-08-23 11:27:05 -07:00
Microsoft.Test.Pict.nuspec Restructure the package's structure 2021-10-23 08:38:57 -07:00
README.md Adding building using CMake (#81) 2022-03-29 14:30:20 -07:00
_build.cmd Removing a hard dependency on wcout in PrintOutput. 2017-11-26 15:39:16 -08:00
_clean.cmd Cleaning up the project files 2018-09-15 09:54:27 -07:00
_test.cmd Initial commit of the codebase. 2015-10-16 10:00:07 -07:00
_update_baselines.cmd Initial commit of the codebase. 2015-10-16 10:00:07 -07:00
pict.sln New projects: one to compile CLI as a DLL and another containing usage example 2018-09-14 15:47:48 -07:00
pict.spec RPM packaging support (#21) 2017-11-26 14:05:19 -08:00

README.md

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/.

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 on Linux, OS/X, *BSD, etc.

PICT uses CMake to build on Linux. Assuming installation of CMake and C++ toolchain, following set of commands will build and run tests in the directory build

> cmake -DCMAKE_BUILD_TYPE=Release -S . -B build
> cmake --build build
> pushd build && ctest -v && popd

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.