-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a76271
commit 3fc5151
Showing
5 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
--- | ||
date: '2024-07-14' | ||
title: 'Release 0.14' | ||
description: 'Adding features such as HTML report, logger (JUnit XML), strict mode, SHA-256 checksum validation, custom asserts, and other improvements.' | ||
coverUrl: '/covers/2024-07-14-release-0-14.png' | ||
coverAlt: 'bashunit integrated into PHPStan' | ||
|
||
aside: false | ||
--- | ||
|
||
# {{ $frontmatter.title }} | ||
|
||
<time>{{ $formatDate($frontmatter.date) }}</time> | ||
|
||
## 🐛 Bug fixes | ||
|
||
- Fixed `SHOW_EXECUTION_TIME` on macOS [#282](https://github.com/TypedDevs/bashunit/pull/282) | ||
- Fix `echo` breaks test execution results [#275](https://github.com/TypedDevs/bashunit/pull/275) | ||
|
||
## 🏗️ New features | ||
|
||
### Logger (JUnit XML) | ||
|
||
- Docs: <a href="/command-line#logging">Command line: Logging</a> | ||
- PR: [#279](https://github.com/TypedDevs/bashunit/pull/279) | ||
|
||
`./bashunit -l|--log-junit <log.xml>` | ||
|
||
Create a report XML file that follows the JUnit XML format and contains information about the test results of your bashunit tests. | ||
|
||
<img src="/imgs/2024-07-14/log-junit-demo.png" width="100%"> | ||
|
||
### Report HTML | ||
|
||
- Docs: <a href="/command-line#report">Command line: Report</a> | ||
- PR: [#281](https://github.com/TypedDevs/bashunit/pull/281) | ||
|
||
`./bashunit -r|--report-html <report.html>` | ||
|
||
Create a report HTML file that contains information about the test results of your bashunit tests. | ||
|
||
<img src="/imgs/2024-07-14/report-html-demo.png" width="100%"> | ||
|
||
### Debug mode | ||
|
||
- Docs: <a href="/command-line#debug">Command line: Debug</a> | ||
- PR: [#290](https://github.com/TypedDevs/bashunit/pull/290) | ||
|
||
`./bashunit --debug` | ||
|
||
Enables a shell mode in which all executed commands are printed to the terminal. Printing every command as executed may help you visualize the script's control flow if it is not working as expected. | ||
|
||
<img src="/imgs/2024-07-14/debug-demo.png" width="100%"> | ||
|
||
### Custom asserts | ||
|
||
- Docs: <a href="/custom-asserts">Custom asserts</a> | ||
- PR: [#276](https://github.com/TypedDevs/bashunit/pull/276) | ||
|
||
You can extend the language by building your custom assertions. It is ideal for custom domain assertions, which don't need to be in the core library. | ||
|
||
```bash [Example] | ||
# Your custom assert using the bashunit facade | ||
function assert_foo() { | ||
local actual="$1" | ||
|
||
if [[ "foo" != "$actual" ]]; then | ||
bashunit::assertion_failed "foo" "$actual" | ||
return | ||
fi | ||
|
||
bashunit::assertion_passed | ||
} | ||
|
||
# Your test using your custom assert | ||
function test_assert_foo_passed() { | ||
assert_foo "foo" | ||
} | ||
``` | ||
|
||
### Checksum validation | ||
|
||
- Docs: <a href="/installation#verify">Installation: Verify</a> | ||
- PR: [#278](https://github.com/TypedDevs/bashunit/pull/278) [#287](https://github.com/TypedDevs/bashunit/pull/287) | ||
|
||
Security is an important aspect of FOSS. Therefore, we will help ensure that there is an easy way to validate the executable for each official release by publishing the SHA-256 hash in a file and on the GitHub release page. | ||
|
||
## 🌾 Miscellaneous | ||
|
||
- Enable strict mode [#239](https://github.com/TypedDevs/bashunit/pull/239) [#241](https://github.com/TypedDevs/bashunit/pull/241) [#285](https://github.com/TypedDevs/bashunit/pull/285) | ||
- Add `dump` and `dd` functions for local development debugging [#286](https://github.com/TypedDevs/bashunit/pull/286) | ||
- Improve build [#289](https://github.com/TypedDevs/bashunit/pull/289) | ||
|
||
--- | ||
|
||
See the full changelog in <a href="https://github.com/TypedDevs/bashunit/blob/main/CHANGELOG.md">GitHub</a> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.