new
Creates a new CAT project file using predefined templates.
CAT configuration is easy. But still, why should you remember the syntax? CAT comes with predefined templates for your project files - their goal is to get you started ASAP. Whether you are starting with CAT or you use CAT daily, cat new
will help you get things done quickly.
Let’s start simple
The simplest way to create a new project from a template is this:
# useful for regular users of CAT
catcli new -t default
It creates very simple project file. This is most useful for people who already know and use CAT and don’t wont a project file cluttered with lots of comments and examples.
List available templates
If you are new to CAT, we have a good news for you. We prepared lots of examples how to use CAT (and we’ll be adding new). To see what examles are available, run:
catcli new --list
The command will return list of templates that come out-of-the-box with CAT:
New to CAT? Use these…
If you are just starting with CAT and you want to explore and run sample test against data, we recommand you choose one of these templates:
Get started - MS Windows
catcli new --template getStartedWindows --commented
This template contains only a few simple tests and should help you understand the CAT’s configuration. (Get started for Linux is coming soon).
Examle CAT project (AERO)
catcli new --template sampleProject --commented
The goal of this template is to give you an idea what a typical small testing project may look like. It contains lots of tests.
Online templates
We add new templates and we also update existing templates. You don’t have to wait for new versions of CAT to get those. CAT CLI can connect to our server and get new versions of project templates. Also, the bigger samples, such as AERO sample project, we plan to keep only online - to keep the installation footprint of CAT small.
CAT does not communicate online by default, you have to specifically request that, using --online
(or simply -o
) switch:
catcli new --list --online
Add the switch when you create a new project from a online template:
catcli new -t default --online
In that case CAT first checs if there is newer version online. If yes, it downloads it and uses it (and uses it since then in “offline” mode too).
Template content
The templates typically contain the CAT project file, read-me file, sample data and a script that can run the sample from command line. This depends on the template, all the stuff is present only when it makes sence.
All options
Short | Long name | Description |
---|---|---|
N/A | --list |
Shows list of available templates. Can be combined only with -o and -l |
-t |
--template |
Code of the template to use |
-o |
--online |
When combined with -l returns list of templates from CAT server. When combined with -t gets the template (or newer version) from CAT server, if needed |
n |
--name |
Name for the new created project. Use only English letters and numbers. |
-d |
--directory |
Target path, where you want the files to be created. CAT will not wrap then in a directory unless combined with -w . If not specified, current directory is used. |
-c |
--commented |
Include descriptive comments to the project file. |
-f |
--force |
Clears the target directory before creating new content. !! Take care, beware where you are. Combine with -t ideally. |
-w |
--wrap |
Wrap the creted content in a directory. It will have the same name as the project name. |
-l |
--loggingLevel |
Useful only for troubleshooting. None, Error, Information, Debug. Default is Error. |
Example:
catcli new -t default -n MyNewProject -w
The command will create a new directory named MyNewProject
in your current working directory. It will create the content from the default template.