netsurf-test: branch master updated. ea2f3b60383166c576c446d092b3a98eb114feb7
Gitweb links: ...log http://git.netsurf-browser.org/netsurf-test.git/shortlog/ea2f3b60383166c576c446d092b3a98eb114feb7 ...commit http://git.netsurf-browser.org/netsurf-test.git/commit/ea2f3b60383166c576c446d092b3a98eb114feb7 ...tree http://git.netsurf-browser.org/netsurf-test.git/tree/ea2f3b60383166c576c446d092b3a98eb114feb7 The branch, master has been updated via ea2f3b60383166c576c446d092b3a98eb114feb7 (commit) from f3ec99cee86cb5ee8057d2cf1971ea44d2de2bb8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commitdiff http://git.netsurf-browser.org/netsurf-test.git/commit/?id=ea2f3b60383166c576c446d092b3a98eb114feb7 commit ea2f3b60383166c576c446d092b3a98eb114feb7 Author: Vincent Sanders Commit: Vincent Sanders test about scheme diff --git a/monkey-test/about-scheme.yaml b/monkey-test/about-scheme.yaml new file mode 100644 index 000..c1db719 --- /dev/null +++ b/monkey-test/about-scheme.yaml @@ -0,0 +1,173 @@ +title: about scheme +group: no-networking +steps: +- action: launch + language: en +- action: window-new + tag: win1 +# ensure 404 behaviour +- action: navigate + window: win1 + url: about:does-not-exist +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 + checks: + - text-contains: "Unknown page: about:does-not-exist" +# check about:credits +- action: navigate + window: win1 + url: about:credits +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 + checks: + - text-contains: NetSurf Credits + - bitmap-count: 1 +# check about:licence +- action: navigate + window: win1 + url: about:licence +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 + checks: + - text-contains: NetSurf Licence + - bitmap-count: 1 +# check about:license +- action: navigate + window: win1 + url: about:license +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 + checks: + - text-contains: NetSurf Licence + - bitmap-count: 1 +# check about:welcome +- action: navigate + window: win1 + url: about:welcome +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 + checks: + - text-contains: Welcome to NetSurf + - bitmap-count: 1 +# check about:config +- action: navigate + window: win1 + url: about:config +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 + checks: + - text-contains: NetSurf Browser Config + - bitmap-count: 1 +# check about:Choices +- action: navigate + window: win1 + url: about:Choices +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 + checks: + - text-contains: Automatically generated current NetSurf browser Choices +# check testament +- action: navigate + window: win1 + url: about:testament +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 + checks: + - text-contains: Automatically generated by NetSurf build system +# check about +- action: navigate + window: win1 + url: about:about +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 + checks: + - text-contains: NetSurf List of About pages + - bitmap-count: 1 +# check logo +- action: navigate + window: win1 + url: about:logo +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 + checks: + - bitmap-count: 1 +# check imagecache +- action: navigate + window: win1 + url: about:imagecache +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 + checks: + - text-contains: NetSurf Browser Image Cache Status + - bitmap-count: 1 +# check blank +- action: navigate + window: win1 + url: about:blank +- action: block + conditions: + - window: win1 +status: complete +- action: plot-check + window: win1 +# check certificate +- action: navigate + window: win1 + url: "about:certificate?cert=MIIHMzCCBhugAwIBAgISBEgH6UXBfQdBlws084Dpg65lMA0GCSqGSIb3DQEBCwUAMEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQDExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xOTEyMTcwNTMxMzdaFw0yMDAzMTYwNTMxMzdaMB4xHDAaBgNVBAMTE25ldHN1cmYtYnJvd3Nlci5vcmcwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDa4ZUDrnoaKKa-RGr6r259vfoLgoAtPwqjJm1cTq6dXZh3IFTgHwCnEh19Yha2iCROO9wDaoxlsBsR13ICnHqx7gq-r5eCLQQYXka2dHCVQ_JtPjDInEd7R_0vCHEfROMbkfXB_6jfVtDjWtqUI-5l5WC9zadB_Aqc0wIrxvdDGvjbbx_AYme5U-djKf6muy3sKPbP3LqMCe3zn6gtMItL8oAjAuW7SEoENdLtRLFUI0qHWpFZS8SZspxlDM9x0ecJhzd_ItNIk4LgIHfdFSHcFIvOFvq0HJs7Up6Ym6Cs2fftqQY5
netsurf: branch master updated. release/3.9-570-g06b709f
Gitweb links: ...log http://git.netsurf-browser.org/netsurf.git/shortlog/06b709f71a7e1ac2bb2b17d99bd155e4a993963d ...commit http://git.netsurf-browser.org/netsurf.git/commit/06b709f71a7e1ac2bb2b17d99bd155e4a993963d ...tree http://git.netsurf-browser.org/netsurf.git/tree/06b709f71a7e1ac2bb2b17d99bd155e4a993963d The branch, master has been updated via 06b709f71a7e1ac2bb2b17d99bd155e4a993963d (commit) via 5bc21c0467b2e6c8ed44f72c7ed42c7ebc4ce5ae (commit) from fa1f1dcd1188ab80803b1ef0773020d1378dbfc4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=06b709f71a7e1ac2bb2b17d99bd155e4a993963d commit 06b709f71a7e1ac2bb2b17d99bd155e4a993963d Author: Vincent Sanders Commit: Vincent Sanders Improve unit testing documentation headers and code blocks diff --git a/docs/unit-testing.md b/docs/unit-testing.md index 49d82ed..054c8e5 100644 --- a/docs/unit-testing.md +++ b/docs/unit-testing.md @@ -1,8 +1,9 @@ NetSurf Unit Testing -Overview - +[toc] + +# Overview NetSurf has unit tests integrated in the test directory. These tests use the check unit test framework for C [1]. @@ -13,8 +14,7 @@ programs although the framework does not madate this and some test programs contain more than one suite. -Execution -- +# Execution The test programs are executed by using the standard "test" target from the top level make invocation. The "coverage" target additionally @@ -25,8 +25,7 @@ The check library must be installed to run the tests and the CI system automatically executes all enabled tests and generates coverage reports for each commit. -Adding tests - +# Adding tests The test/Makefile defines each indiviadual test program that should be built and executed in the TESTS variable. @@ -39,128 +38,128 @@ Each individual test program requires a main function which creates one (or more) suites. The suites are added to a test runner and then executed and the results reported. -int main(int argc, char **argv) -{ - int number_failed; - SRunner *sr; - - sr = srunner_create(foo_suite_create()); - //srunner_add_suite(sr, bar_suite_create()); - - srunner_run_all(sr, CK_ENV); - - number_failed = srunner_ntests_failed(sr); - srunner_free(sr); - - return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; -} +int main(int argc, char **argv) +{ + int number_failed; + SRunner *sr; + + sr = srunner_create(foo_suite_create()); + //srunner_add_suite(sr, bar_suite_create()); + + srunner_run_all(sr, CK_ENV); + + number_failed = srunner_ntests_failed(sr); + srunner_free(sr); + + return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; +} Suite creation is done with a sub function to logically split suite code into sub modules. Each suite has test cases added to it. -Suite *foo_suite_create(void) -{ - Suite *s; - s = suite_create("foo"); - - suite_add_tcase(s, baz_case_create()); - suite_add_tcase(s, qux_case_create()); - - return s; -} +Suite *foo_suite_create(void) +{ + Suite *s; + s = suite_create("foo"); + + suite_add_tcase(s, baz_case_create()); + suite_add_tcase(s, qux_case_create()); + + return s; +} Test cases include the actual tests to be performed within each case. -TCase *baz_case_create(void) -{ - TCase *tc; - tc = tcase_create("Baz"); - - tcase_add_test(tc, xxyz_test); - tcase_add_test(tc, zzyx_test); - - return tc; -} +TCase *baz_case_create(void) +{ + TCase *tc; + tc = tcase_create("Baz"); + + tcase_add_test(tc, xxyz_test); + tcase_add_test(tc, zzyx_test); + + return tc; +} A test case may optionally have a fixture which is code that is executed before and after each test case. Unchecked fixtures are executed once before the test process forks for each test whereas checked fixtures are executed for each and every test. -static void fixture_setup(void) -{ -} - -static void fixture_teardown(void) -{ -} - -TCase *qux_case_create(void) -{ - TCase *tc; - - /* Matching entry tests */ - tc = tcase_create("Match"); - - tcase_add_checked_fixture(tc, - fixture_setup, - fixture_teardown); - - tcase_add_test(tc, zzz_test); - - return tc; -} +static void fixture_setup(void) +{ +} + +static void fixture_teardown(void) +{ +} + +TCase *qux_case_create(void) +{ + TCase *tc; + + /* Matching entry tests */ + tc = tcase_create("Match");