Menu traversal test engine #83

Open
opened 2024-09-25 02:48:21 +02:00 by lash · 0 comments
Owner

A test engine is required to execute and verify menu traversals.

The implementations are planned to be done in this order:

Inputs

This test engine must accept a vector of user inputs to sequentially run calls to engine.Exec with.

The first branch/pull-request for the implementation should only include the inputs.

Expected results

It must accept a vector of expected results, made up of pointers to individual OPTIONAL items to test against. A nil item means individual item is deactivated for that step. The items are:

    1. the "cont" return value from engine.Exec
    2a. regex to match the contents written to the io.Writer subsequently passed to engine.Flush
    2b. number to match length of same contents
    3. state flag tester; test whether individual flags are set/not set.
    4. cache tester, testing whether a symbol exists in the cache or not.

The items are numbered in order of implementation. A single branch/pull-request should be created for each implementation item.

Usage

By default, the tester should be EASY to set up for a vector of inputs ONLY as a list of strings (i.e. all items of all expected result tests will be nil).

Also, test cases should be defined with data files that are easy to read and edit.

Error conditions

Neither engine.Exec nor engine.Flush should return errors at any point. Any error returned must result in a failed test.

The same goes for any non 200 error code from HTTP.

A test engine is required to execute and verify menu traversals. The implementations are planned to be done in this order: - [x] [design of test case data files](https://git.grassecon.net/urdt/ussd/issues/84) - [x] [sync driver for test cases, running exec with inputs.](https://git.grassecon.net/urdt/ussd/issues/85) - [ ] expected results: cont - [x] expected results: contents - [x] expected results: state flag - [ ] expected results: cache - [ ] http/async driver for test cases - [ ] at/dialoguss driver for test cases ## Inputs This test engine must accept a vector of user inputs to sequentially run calls to engine.Exec with. The first branch/pull-request for the implementation should only include the inputs. ## Expected results It must accept a vector of expected results, made up of pointers to individual OPTIONAL items to test against. A nil item means individual item is deactivated for that step. The items are: 1. the "cont" return value from engine.Exec 2a. regex to match the contents written to the io.Writer subsequently passed to engine.Flush 2b. number to match length of same contents 3. state flag tester; test whether individual flags are set/not set. 4. cache tester, testing whether a symbol exists in the cache or not. The items are numbered in order of implementation. A single branch/pull-request should be created for each implementation item. ## Usage By default, the tester should be EASY to set up for a vector of inputs ONLY as a list of strings (i.e. all items of all expected result tests will be nil). Also, test cases should be defined with data files that are easy to read and edit. ## Error conditions Neither engine.Exec nor engine.Flush should return errors at any point. Any error returned _must_ result in a failed test. The same goes for any non 200 error code from HTTP.
lash added the
Kind/Testing
Status
Blocked
labels 2024-09-25 02:55:17 +02:00
lash removed the
Status
Blocked
label 2024-09-25 03:00:01 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: urdt/ussd#83
No description provided.