Skip to main content
Version: 9.0.0

How to filter ?

To run specific tests instead of the entire test suite, you can utilize the filtering feature in Test Maker. This allows you to select tests based on various criteria. You have the flexibility to filter using CLI commands or by configuring the source in a configuration file.

Using CLI

You can run specific tests using the CLI with the --source option:

npm run test:ci -- --source "['./folder/**-spec.ts']"

Using Configuration File

You can configure the source in a configuration file. Here's an example of configuring the source to run specific tests:

import { Configuration, mergeAndConcat } from "test-maker";
import { common } from "./test-maker.common";

export const local: Configuration = {
source: [`./src/specs/**/**-spec.ts`],

export default mergeAndConcat(common, local);

With this configuration, only the files matching the specified globs or paths will be executed.

Advanced Filtering

In addition to specifying the source, you can apply more granular filtering based on different criteria:

//By Tags
//by a function
return ["feature-tag-1","feature-1"]
//by glob

You can also decide to use the CLI directly to filter. For example:

npx ketm run -c test-maker.local.ts --filter-feature "Feature 1" --filter-scenario "Scenario Login" --filter-step "Assert Dashboard"



Note that the main percentage take into account skipped features on top of passed and failed features. However we have introduced a bar representing the percentage of passed feature vs failed feature which here displays 91% of passed feature among those executed.