[dali_1.0.1] Merge branch 'tizen'
[platform/core/uifw/dali-adaptor.git] / automated-tests / README.md
1 % Dali Adaptor Automated Testing
2
3 Automated tests for the dali-adaptor project. These tests are callable from the
4 TCT testing framework.
5
6 There are currently three executables built, each of which has its own source
7 directory and contains several test cases. These are:
8
9 *   `src/dali-adaptor`
10     Uses a mocked platform abstraction, so doesn't test the abstraction
11     implementations themselves.
12     This currently tests the timer and key presses only.
13 *   `src/dali-adaptor-internal`
14     Tests some internal components of the abstraction implementations without
15     attempting to have a live or mocked platform abstraction in place.
16     This is the correct place for test cases which can test code in dali-adaptor
17     in isolation.
18     Currently tied to the SLP platform abstraction directly.
19     Noteworthy test cases:
20     *   `utc-Dali-GifLoader.cpp`: Runs the gif loader syncronously and checks
21         that the laoded bitmap matches a reference buffer on a pixel by pixel
22         basis.
23     *   `utc-Dali-CommandLineOptions.cpp`: Tests whether commandline options of
24          Dali are stripped out of various inputs.
25 *   `src/dali-platform-abstraction`
26     Uses a real live platform abstraction so can be used to test features
27     exposed through the `Dali::Integration::PlatformAbstraction` abstract
28     interface.
29     Intended to test complex interactions operate correctly.
30     For example:
31     *   Cancelation of a subset of a large number of in-flight
32         requests.
33     *   Correct reporting of successful and failed requests when large numbers
34         of valid and invalid requests are issued in rapid sequence.
35
36 If a loader for an image type is added to the platform abstractions, a test case
37 should be added to `src/dali-adaptor-internal`, styled after
38 `utc-Dali-GifLoader.cpp`. An image of that type should also be added to the
39  existing image test cases in `src/dali-platform-abstraction`.
40
41 If a new commandline option is added to Dali, `utc-Dali-CommandLineOptions.cpp`
42 should be expanded with it.
43
44 Building
45 ========
46
47 Use the script `build.sh` in the root of `automated-tests/`.
48 To build all three test executables, run the script without arguments:
49
50     ./build.sh
51
52 To build just one executable, pass its name to the build script:
53
54     ./build.sh dali-adaptor
55
56     ./build.sh dali-adaptor-internal
57
58     ./build.sh dali-platform-abstraction
59
60 Running
61 =======
62
63 Use the `execute.sh` script. To execute the tests in all three executables, run the script with no arguments:
64
65     ./execute.sh
66
67 To run just one executable, pass its name to the script:
68
69     ./execute.sh dali-adaptor
70
71     ./execute.sh dali-adaptor-internal
72
73     ./execute.sh dali-platform-abstraction
74
75 To view the results of a test run, execute the following line:
76
77     firefox --new-window summary.xml