Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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).