-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patharchitecture.feature
53 lines (50 loc) · 1.77 KB
/
architecture.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Feature: Mock data generator
Generates a set of edge case values for every fields with of a matrix of all their combinations.
## Scenario: cli generates mock data for a function
a function/method takes parameters, 0 or more objects
when the cli receives the command
then the command is validated
then the objects are scanned
then the fields value ranges are calculated
then the mock data user defined rules are applied
then the base value ranges are created
then the mock data permutations are calculated
filters:
size: min, max, undermin, overmax
empty: empty | !empty
nul: nil | !nil
true|false: true | false
numbers: hex, binary, base16, base32, base64
value ranges:
string:
alpha, alphanumeric, special characters, utf-8, utf-16, regex, nasty string list
bool: true|false, nul, empty,
int: size, true|false, nul, empty
int8: size, true|false, nul, empty
int16: size, true|false, nul, empty
int32: size, true|false, nul, empty
int64: size, true|false, nul, empty
uint: size, true|false, nul, empty
uint8: size, true|false, nul, empty
uint16: size, true|false, nul, empty
uint32: size, true|false, nul, empty
uint64: size, true|false, nul, empty
uintptr: size, true|false, nul, empty
byte: // alias for uint8
rune: // alias for int32
// represents a Unicode code point
float32:
float64:
complex64:
complex128:
## Implementation
* code generator service
* code parsing service
parser.Read(code string) (string, error)
* data generator service
dataGenClient.generate(data_type Type, []filter) (string, error)
* filtering service
filteringClient.reduce(data interface{}, type Type) (error)
* data provider
dataProvider.GetNames(setList []string)
dataProvider.GetNumbers(setList) ([]numbers)