https://github.com/jromero/ugo
testing framework for your tutorials
https://github.com/jromero/ugo
Last synced: 3 months ago
JSON representation
testing framework for your tutorials
- Host: GitHub
- URL: https://github.com/jromero/ugo
- Owner: jromero
- License: apache-2.0
- Created: 2020-08-30T21:13:13.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-31T09:06:13.000Z (9 months ago)
- Last Synced: 2025-04-11T03:14:42.673Z (3 months ago)
- Language: Go
- Size: 52.7 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ugo
A **testing framework** for your tutorials.
Are your tutorials constantly broken or outdated? Are you tired of manually testing your tutorials to make sure the steps actually work?
Fear no more! **Ugo** is here to help automate that!
### Install
```bash
go get -u github.com/jromero/ugo/cmd/ugo
```### Usage
Integrating **Ugo** into your tutorials is done by adding a few hidden HTML comments. You can then use the `ugo` CLI to test your tutorials.
It's that easy!
Here's a quick look at what that may look like.
1. Create the tutorial:
~~~markdown# My Tutorial
First, let's create a file `some-file.txt` with the following content:
```text
some content
```Then, we'll execute `cat` to read the file:
```bash
cat some-file.txt
```Finally, we're make sure the output contains what we expect:
```text
some content
```~~~
2. Run `ugo`:
```bash
ugo run
```3. Output:
```text
[info ][*] Suite 'my-tutorial' executing...
[info ][*][my-tutorial] Running task #1
[info ][*][my-tutorial] Running task #2
[info ][*][my-tutorial] Running task #3
[info ][*][my-tutorial] Running task #4
[info ][*] Nothing broken. Good job!
```For more, check out these [examples](docs/examples).