You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,29 +16,30 @@ and the Flutter guide for
16
16
Supercharge your Dart testing with **parameterized_test**! Built on top of the [dart test package](https://pub.dev/packages/test), this [JUnit ParameterizedTest](https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests) inspired package wrap around `group` and `test` to take your testing to the next level!
- ✅ Run a test multiple times based on provide parameter list.
29
30
- ✅ Built on top of [dart test package](https://pub.dev/packages/test).
30
31
- ✅ Type cast test parameters used in the tests.
31
32
- ✅ Include test options for parameter_test.
32
33
- ✅ Include test options per parameter.
33
34
34
-
## 🛠 Installation
35
+
## Installation 🛠
35
36
36
37
```yaml
37
38
dev_dependencies:
38
39
parameterized_test: [latest-version]
39
40
```
40
41
41
-
## ⚡️ Usage
42
+
## Usage ⚡️
42
43
43
44
Instead of creating a `group` test with multiple of the same `test` and different parameters, you can now use `parameterizedTest` and supply it list of test parameters to run the same test with multiple times.
44
45
Specifying a parameterized test is almost the same as normal test. It has all the same parameters as a normal test like: `skip`or `testOn` etc.
@@ -76,7 +77,7 @@ Here you still need to provide a `test`. This can be useful if you want to have
76
77
77
78
Besides accepting a list of test values, you can also provide a `setUp` and `tearDown` function to run before and after each test.
78
79
79
-
## 🔩 Add test options to parameter
80
+
### Add test options to parameter 🔩
80
81
If you want to add test options to a specific parameter you can do so by using the `options` extension on `List`. This will allow you to add test options like `skip` or `testOn` to a specific parameter.
81
82
82
83
For example:
@@ -100,7 +101,7 @@ parameterizedTest(
100
101
101
102
This will create a `group` with 4 `test` inside it. The second test will receive the provided test options and will be skipped in this case.
102
103
103
-
##📝 Changing test description output
104
+
### Changing test description output 📝
104
105
By default, the test description contains the test value used within the tests. you can override this by using `customDescriptionBuilder`.
105
106
106
107
When normally running parameterized tests with description 'My parameterized test' and the values `[['first', 'second', true], ['third', 'fourth', false]]` the test description output looks something like this:
@@ -124,7 +125,7 @@ My parameterized test 🚀[2] My parameterized test: <<third|fourth|false>>
124
125
125
126
>Note: the first 'My parameterized test' is because parameterized tests make use of a group test. Most IDE's will group this for you and only show the second part.
126
127
127
-
## 📦 Examples
128
+
## Examples 📦
128
129
### Simple test containing a list of single values
0 commit comments