radiasoft / sirepo

Sirepo is a framework for scientific cloud computing. Try it out!
https://sirepo.com
Apache License 2.0
64 stars 32 forks source link

Add useful testing features to myapp #6248

Open e-carlin opened 1 year ago

e-carlin commented 1 year ago

I'm trying to review https://github.com/radiasoft/sirepo/pull/6092/files (websockets) which is a large change to test and could break in any number of places. I'd like to be able to test some of the content too large changes from https://github.com/radiasoft/sirepo/pull/6160 which seems like an interesting change that may show bugs in websockets. But, it is hard to reproduce the content too large errors.

While working on the content too large PR I thought it would be useful to add buttons to myapp that produce the error (ex a button that tried to download a file that was too large). But, the app is in react and so I just added some hacks in srw to test while I was working. Then I threw the hacks away at the end.

I'm now wishing that myapp had a button I could easily press to produce the content too large message.

So, what do people thinking about converting myapp back to angularjs? And additionally, what do people think about adding buttons to myapp to for interesting cases like content too large?

moellep commented 1 year ago

The myapp is still available as an angularjs app. Add this to your env:

# turns off react
export SIREPO_PKCLI_SERVICE_REACT_PORT=
export SIREPO_FEATURE_CONFIG_REACT_SIM_TYPES=

I'm not sure adding test cases to myapp is a good idea - I think it is just supposed to show a bare-bones app for reference. Maybe we need a gui-tester app?

robnagler commented 1 year ago

https://github.com/radiasoft/sirepo/issues/6249

I'm not sure adding test cases to myapp is a good idea - I think it is just supposed to show a bare-bones app for reference. Maybe we need a gui-tester app?

I think it is fine to put in features like this. We are going to have a skeleton generator for the "basic app". myapp is not live on prod so it's not like someone would be confused by it. As long as the buttons are clearly labeled, it'll be clear it is for testing.