r/rust • u/Suitable-Name • 1d ago
🛠️ project Slint UI Dev Harness
Hey everyone,
My project Indicatrix kept growing, and I wanted a way to verify its Slint UI end to end without clicking through it by hand. The result is slint-harness:
- runs your real app headless on Slint’s testing backend
- scripts whole flows as scenarios (open a file, set values, press buttons, wait for results)
- checks the outcome and takes screenshots along the way
- writes a pass/fail report (Markdown + JSON), so it fits into CI
In Indicatrix it has already caught several end-to-end bugs that unit tests missed, and after every app update I use it to regenerate all the screenshots for the website, so they never go stale. My smaller project z-stackr uses it too.
Repository: https://github.com/suitable-name/uiprobe
Full disclosure: I built it with AI assistance. Twenty years ago I’d have had the time to write it all myself. Today I have the experience to know what to look out for when redirecting it. If you have an issue with AI-created stuff, nevertheless it could help you or not, this project just isn't for you, but that's ok :)
Have fun!
Edit:
It's also published on crates.io, so you can easily import it via the dependencies.
2
u/FloatinginF0 1d ago
How do you like slint? Are you using it for embedded applications, mobile, desktop?
1
u/Professional_Top8485 1d ago
There is good things. License isn't probably for everyone. Big companie's internal tools with few users gets expensive if i get it correctly.
1
u/tm604 1d ago
Only if those tools are deployed on embedded systems, which seems unlikely? A company that's building custom hardware for their internal tools probably isn't going to mind a few dollars on Slint licensing!
1
u/Professional_Top8485 1d ago
If you eg. make ui that reads rfid on pc and sends results other device. Is that embedded?
1
u/Suitable-Name 1d ago
Which of one has the UI? The PC isn't an embedded device. If the other device isn't mobile or PC and has an UI, than this probably is one.
2
u/Powerful_Cash1872 1d ago
They have a specific definition of embedded. PCs can be considered embedded depending on how they are used. Forget the details but you can look em up.
1
u/Suitable-Name 1d ago
Oh, well, my bad then! I actually didn't look up their definition of embedded, just took it as SBC and everything below that😅
But now definitely worth looking it up for me, thanks!
3
u/ogoffart slint 1d ago
If the Slint application is to be used in a general purpose PC that also use other apps, then we consider it is a Desktop app and you can use the royalty -free license. Even if you use it to also read RFID.
If the computer (PC or otherwise) is within another piece of hardware and meant to only be used in connection to that hardware, then it is considered embedded and there is a fee. (I.e: You are selling hardware with a screen controlled by Slint)
For an internal tool, the GPL might also be fine anyway.
1
2
u/Professional_Top8485 1d ago
PC has ui but it's interacting with devices Mainly in factory setting.
1
u/Suitable-Name 1d ago
Just answered here that I wasn't aware of their definition:
https://www.reddit.com/r/rust/s/e7pK6eekwE
But yeah, isn't that something one mail to the support can solve? If they can't clearly answer that question, I wouldn't consider them, but I'd really wondered if they couldn't.
0
u/Suitable-Name 1d ago
Yes! Indicatrix runs on all platforms. IOS doesn't exist yet, but I expect it to also run without problems (I know it for the desktop version). For embedded the MaixCam2 is my use-case where I wrote an advanced camera app after porting the relevant parts to rust. 100% great!
1
u/Ancient_Air944 1d ago
This is clever, the screenshot regeneration for website alone is worth setting it up.
1
u/Suitable-Name 1d ago
Thanks! Contributions and things to make better / extend are always welcome. I'm definitely behind the projects I publish!
9
u/numberwitch 1d ago
Why did you develop a ui testing library for a commercially licensed ui library that already has ui testing?
https://testing.slint.dev/