flow-cli icon indicating copy to clipboard operation
flow-cli copied to clipboard

`flow test` configuration and default behaviour

Open wfalcon0x opened this issue 1 year ago • 1 comments

Instructions

Issue To Be Solved

Currently we require to execute a command line command with many parameters each time we want to run cadence tests with flow cli, e.g. flow test --cover --covercode="contracts" cadence/test/*

(Optional): Suggest A Solution

To increase developer efficiency while working with flow test I suggest to be able to run flow test with sensible defaults without parameters, and provide with an option to define a test configuration file, where defaults can be overridden.

The expected developer experience is to by running flow test tests are executed with sensible behaviour as long as they are placed in the directory defined by conventions the community agrees on. Developers should also be able to configure in a test configuration file any custom location and other configurations if their project has different requirements.

Sensible conventions should be determined for each parameter, e.g. in the above example flow test could execute tests in the cadence/tests/* directory by default.

(Optional): Context

Testing frameworks in other language ecosystems (e.g. jest) adopted philosophy to make the tool work great by default, but give a way to configure if developers prefer to use it in a different way. This can positively effect developer experience.

wfalcon0x avatar Feb 03 '24 11:02 wfalcon0x

This seems like a great idea @wfalcon0x. I think we can work in during some upcoming changes. Thanks for creating this issue.

chasefleming avatar Feb 08 '24 18:02 chasefleming