You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to find a way how to test code with rid store, but without Flutter.
My demo is little bit ugly..
Is there a more convenient way, perhaps?
It may be worth considering adding more convenient testing tools in the future?
Sorry for replying late, I had lost track of my github notifications :)
This is an awesome idea. I hadn't thought about this as I'm currently testing rid itself with some integration tests which are basically mini apps. I'm testing them via Dart tests.
If you're just trying to avoid having to run Flutter to run tests you could do something similar to that. Those tests are here.
However those run somewhat slow and I bet the ones you're creating run a lot faster. Also they allow you to debug your app since it's running rust directly (something that isn't currently possible when running things via dart).
So I totally love it!
Multiple Steps
1. Example Prototype
What I'd suggest is to create a sample app with those tests inside the rid-examples repo. Include all the boilerplate to make it work there and submit a PR. This can serve as an example for others to do the same.
2. Building this into Rid
Once we got this example we can look at what parts make sense to include with rid and expose via a testing API.
3. Simplify Example
Once we got that rid test API we can simplify the example to just use that instead.
Implementation
I'm not a huge fan of more macros especially since the rust-analyzer provides very limited intellisense for those still. If we can have functions instead, but we can discuss details with the prototype PR (which you should just file in draft mode once you even got the minimum working so we can iterate on the idea).
Also it'd be nice to not call update directly, but somehow use the messaging API instead. You basically just need to get a hold of the Isolate and communicate with that. A good starting point to see how this works is to run cargo expand in a simple example and see what message related code gets generated.
That way the tests run even closer to how the app would run with Dart/Flutter.
So I'm looking forward to the initial implementation in the PR. It's better to discuss directly on code and that way I can also branch off and commit some ideas + help out.
I'm trying to find a way how to test code with rid store, but without Flutter.
My demo is little bit ugly..
Is there a more convenient way, perhaps?
It may be worth considering adding more convenient testing tools in the future?
The text was updated successfully, but these errors were encountered: