Skip to content

Commit 90b78c2

Browse files
committed
Align code box
1 parent 9d7c65b commit 90b78c2

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎reader/content/testing/blackbox/_index.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ There are a variety of black box testing approaches that are used in practice:
1212
* **Boundary value analysis (BVA)**: Most functions can take an unbounded number of inputs. BVA seeks to identify which of those are most valuable to test. The intuition behind this process is that inputs at the *boundary* of an input domain are more likely to be problematic than those that are not.
1313

1414
For example, when testing a numeric input that accepts values `1..10`, natural inputs outside the boundary would include `0` and `11` while natural inputs within the boundary could include `1` and `10`. BVA can also be applied to more complex types, such as dates with specified formats (e.g., `YYYY-MM-DD`) or objects with multiple fields. For example:
15-
```typescript
16-
interface User {
17-
// Must not be more than 6 chars
18-
username: string,
19-
// Must contain at least one uppercase char
20-
password: string,
21-
}
22-
```
15+
```typescript
16+
interface User {
17+
// Must not be more than 6 chars
18+
username: string,
19+
// Must contain at least one uppercase char
20+
password: string,
21+
}
22+
```
2323
Where `username` and `password` have specific restrictions on what inputs are valid. {{< youtube IRQU_fHKUa0 >}}
2424

2525
* **Equivalence class partitioning (ECP)**: While testing at the boundaries is useful and often uncovers subtle defects, it is also useful to test more commonly expected inputs to ensure that the code under test is behaving as expected. As with boundary value analysis, equivalence class partitioning seeks to decrease the input space from all possible inputs to a reasonable subset of inputs. To do this, inputs are decomposed into *classes*, and testers ensure that at least one input from each class is validated.

0 commit comments

Comments
 (0)