After building tools within the engine for a few years now this has always been a thing I’ve come back to but never found anything definitive so I thought I’d ask here to see if there are approaches I’m unaware of or other creative ways to do it. So far from all the resource I had found, they involved writing C++ test cases. As good as that is to have, it doesn’t have an accurate way to represent UI state of an editor utility widget or any other subsystem that it may depend on.
For example, for the simplest base case, if I had a simple editor utility widget with a property view slot (skeletal mesh) and an action button the runs a function on the skeletal mesh, how would I go about setting up test cases for it? ie. No mesh selected, unsupported mesh, mesh variant A, mesh variant B, etc.
I think being able to do this not just on standard developers’ end but also on Epic’s end would increase the stability of the editor drastically. A lot of the bugs I’ve found over the years could have been an easily logged unit test case that could have been flagged early and help adhere to stricter release cycles.
The only workaround that I’ve though of so far to achieve this is to write it directly within in the widget as bloatware and to yank it on release. Having said that, not all mouse click/drag and drop operations can necessarily be emulated with blueprints or easily with scripting, nor is it easy to snapshots UI states and recall them. However if this is something that we can plan for in future versions I think we can definitely provide a more robust developer experience.