Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-14T12:31:09.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T06:25:23.918Z (9 months ago)
- Language: Go
- Size: 50.8 KB
- Stars: 3
- Watchers: 3
- 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).