Tesuto
Tesuto is a minimalist and lightweight tool for testing. Tesuto designed to be easy to set up and be as fast as possible. Tesuto allows developers to focus on solving deployment problems.
Installation
From releases
- Go to the releases section and select the version you want to install.
- Download archive and unpack it.
- Place executable file to the location that exists in the
PATHenvironment variable.
If you cant run executable with error
permission denied, runsudo chmod +x <path_to_tesuto>to make it possible to run it.
From crates.io
- Download
rustupand install it by following instructions. - Run
cargo install --locked tesutoand wait until end of compilation. - Tesuto ready to use.
Build from source
- Download
rustupand install it by following instructions. - Clone this repository and enter it directory.
- Run
git checkout latestto use sources from latest version orgit checkout mainto use unstable version. - You can run
cargo buildto build executable with debug info orcargo build --releasesto build version with optimizations.
Configuration
Generate new project
After installation, open a terminal and enter the directory with your project in which you want to use Tesuto. Next, you need to create a new project file:
tesuto new
Structure
Tesuto generates default project and save it as tesuto.yml.
It will look like this:
name: TesutoProject
stages:
hello:
before_script:
script:
- echo "Hello World!"
variables:
quite: false
You have 2 options: name and stages. name is a name for youe project. stages is where you will write every stage for your project.
You can get a list of stages in project with tesuto list.
Stage structure
Let's take a look at options for hello stage.
before_script- commands that will be executed before main scripts will. You can leave it empty.script- commands for this stage. It's cant be empty.variables- environment variables for each script (includingbefore_script).quite- show output or no. By default it'sfalse- show all output.
Configuring new stage
Use command add and pass name to create new stage with specific name.
For example, let's create new stages called spam.
tesuto add spam
Now we have a new stage in our project. Let's add a new command to stage.
To do this, let's edit script option.
In YAML, to add a new string to an array, we use - prefix.
Let's add echo again, but now "Hello again!" will be printed:
spam:
before_script:
script:
- echo "Hello World!"
# New command in stage.
- echo "Hello again!"
variables:
quite: false
We can also try to add environment variable in variables option.
Syntax for variables:
VARIABLE_NAME: "variable value"
Let's add HELLO variable with Hello value and try to print it via last echo command.
spam:
before_script:
script:
- echo "Hello World!"
# We are adding $ sign beacuse it's an environment variable.
- echo "$HELLO again!"
variables:
# New variable
HELLO: "Hello"
quite: false
But why don't we add the - prefix?
Because it's not an array.
It's an option.
Also we can set quite mode for stage with quite. I think his syntax looks similiar for you.
Run project
To run project use run command.
tesuto run
Tesuto will automatically give a sign if there's something wrong happen.
Also, you can run specific stage with run-stage command.
tesuto run-stage hello
Project layout
├─ imgs/ Images for README.
├─ target/ Build directory
├─ tesuto/ App source code.
└─ tesuto_project/ Library that contains project structure for Tesuto.