Difference between revisions of "Testing Tool (Specification)"

(Created Testing Tool page which will contain specifications (for users))
 
(Added example tests to specifications (provisional))
Line 1: Line 1:
 
 
[[Category:Testing]]
 
[[Category:Testing]]
 +
 +
== Main functionalities ==
 +
 +
=== Add unit/system level tests ===
 +
 +
Example unit tests '''test_append''' and '''test_boolean'''
 +
<eiffel>
 +
 +
class TEST_STRING
 +
 +
inherit
 +
 +
    TEST_SET
 +
        redefine
 +
            set_up
 +
        end
 +
 +
feature {NONE} -- Initialization
 +
 +
    set_up
 +
        do
 +
            create s.make (10)
 +
        end
 +
 +
feature -- Access
 +
 +
    s: STRING
 +
 +
feature -- Test routines
 +
 +
    test_append
 +
        require
 +
            set_up: s /= Void and then s.is_empty
 +
        do
 +
            s.append ("12345")
 +
            assert_string_equality ("append", s, "12345")
 +
        end
 +
 +
    test_boolean
 +
        require
 +
            set_up: s /= Void and then s.is_empty
 +
        do
 +
            s.append ("True")
 +
            assert_true ("boolean", s.is_boolean and then s.to_boolean)
 +
        end
 +
 +
end
 +
 +
</eiffel>
 +
 +
 +
Example system level test '''test_version'':
 +
 +
<eiffel>
 +
 +
class TEST_MY_APP
 +
 +
inherit
 +
 +
    TEST_SET
 +
 +
feature -- Test routines
 +
 +
    test_version
 +
        do
 +
            run_system_with_args ("--version")
 +
            assert_string_equality ("version", last_output, "my_app version 0.1")
 +
        end
 +
 +
end
 +
 +
</eiffel>
 +
 +
=== Manage and run test suite ===
 +
 +
=== Create tests automatically ===
 +
 +
=== Turn any failed execution into a test ===
 +
 +
=== Background test execution ===

Revision as of 08:55, 6 June 2008


Main functionalities

Add unit/system level tests

Example unit tests test_append and test_boolean

class TEST_STRING
 
inherit
 
    TEST_SET
        redefine
            set_up
        end
 
feature {NONE} -- Initialization
 
    set_up
        do
            create s.make (10)
        end
 
feature -- Access
 
    s: STRING
 
feature -- Test routines
 
    test_append
        require
            set_up: s /= Void and then s.is_empty
        do
            s.append ("12345")
            assert_string_equality ("append", s, "12345")
        end
 
    test_boolean
        require
            set_up: s /= Void and then s.is_empty
        do
            s.append ("True")
            assert_true ("boolean", s.is_boolean and then s.to_boolean)
        end
 
end


Example system level test 'test_version:

class TEST_MY_APP
 
inherit
 
    TEST_SET
 
feature -- Test routines
 
    test_version
        do
            run_system_with_args ("--version")
            assert_string_equality ("version", last_output, "my_app version 0.1")
        end
 
end

Manage and run test suite

Create tests automatically

Turn any failed execution into a test

Background test execution