Skip to content

How to run all tests that are in different directories #140

Open
@amimas

Description

@amimas

Hi,

I'm working with a project that has several functions organized in different directories. The tests are also in corresponding directories. Below is an example of what the directory structure looks like.

.
└── handlers
    ├── function-one
    │   ├── fixtures
    │   └── test
    ├── function-two
    │   ├── fixtures
    │   └── test
    ├── function-three
    │   ├── fixtures
    │   └── test

Right now I can run tests for each of those individual functions by running sls invoke test --function function-one --path=handlers/function-one/test.

Is there an option so that I can run tests for all functions? I tried to use a glob pattern for the path parameter (i.e. sls invoke test --path=handlers/**/test), but that doesn't work.

Ofcourse I can create a separate script to parse through each directories and then run the tests for each function as a separate invokation. I'm wondering if there's a native way of handling this without requiring a separate script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions