protostar icon indicating copy to clipboard operation
protostar copied to clipboard

Automatically build package when running e2e tests

Open cptartur opened this issue 1 year ago • 3 comments

Current setup requires manually building the package after each change for the e2e tests to reflect these changes. It is quite cumbersome and can be confusing when debugging if one forgets to rebuild.

cptartur avatar Mar 28 '23 11:03 cptartur

I am not enteriely sure how to execute it as it would have limit access to pytest cli which is useful while debugging.

generally when i debug i want to use something like pytest path/to/test.py

Maybe we could just document an alias:

alias pytestR="poe build && pytest"

MaksymilianDemitraszek avatar Mar 30 '23 08:03 MaksymilianDemitraszek

Alias is only helpful to some extend. I'm most often running tests through pycharm directly, so unless it is handled on the pytest level, this won't change anything for me.

cptartur avatar Mar 30 '23 09:03 cptartur

We could create pytest fixturesthat would either:

  • build protostar package and inject it to tests
  • create an autouse fixture that would call build command in subprocess and wait for it to complete

Didn't consider possible issues with this approach. The latter seems easier because it most likely wouldn't require us to change any testing architecture.

cptartur avatar Apr 14 '23 08:04 cptartur