Creating a project

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, New-CatProject 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
New-CatProject
# you can specify a name for the new project
New-CatProject -Name AeroTesting

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:

Get-CatProjectTemplate

The command will return list of templates that come out-of-the-box with CAT:

List of templates for new project

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

New-CatProject -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)

New-CatProject -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 switch:

Get-CatProjectTemplate -Online

Add the switch when you create a new project from a online template:

New-CatProject -Template 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.

CAT project template content

All options

Get-CatTemplate

Option Description
-Online If present, CAT returns list of templates available online, otherwise it shows out-of-the-box templates.
-LoggingLevel None, Error, Information, Debug. Default is Error.

New-CatProject

Option Description
-Name Name for the new created project. Use only English letters and numbers.
-Path Target path, where you want the files to be created. CAT will not wrap then in a directory unless combined with -Wrap. If not specified, current directory is used.
-Template Code of the template to use
-Online Gets the template (or newer version) from CAT server, if needed
-Commented Include descriptive comments to the project file.
-Force Clears the target directory before creating new content. !! Take care, beware where you are. Combine with -t ideally.
-Wrap Wrap the creted content in a directory. It will have the same name as the project name.
-LoggingLevel Useful only for troubleshooting. None, Error, Information, Debug. Default is Error.

Example:

New-CatProject -Template default -Name MyNewProject -Wrap

The command will create a new directory named MyNewProject in your current working directory. It will create the content from the default template.