- Home /
Is there a way to display integration test results in the editor GUI?
Hi,
I'm currently working on trying to improve the integration test system in Unity. Right now I've created my own GUI that will display a list of buttons that show the available integration tests for a project I'm working on.
What I want to do is after running a/multiple integration test(s), have the results of the tests be aggregated somewhere so that I can stick them in another GUI window or something. By results of the tests, I mean more than just "test failed" or "test passed".
Is there anything like this that can be done?
Thanks!
Hey, little necromancy won't hurt - did you, by any chance, come up with some editor script to speed up running integration tests split up among multiple scenes? Or anything else you would, by any chance, like to share?
Answer by Bunny83 · Oct 30, 2014 at 09:54 PM
You said you have created your own GUI for the tests. Where have you created those buttons? In a runtime script or an editor script like an EditorWindow? I'm not entirely sure if i understood your actual setup right.
If you already have an EditorWindow you can display whatever you want in there. For example a TextArea that acts as custom logging console. Or even a scrollview that displays the results of each test with individual gui elements. Do you have any concrete example? Something like: There's a button to start the test, when done the results (should) look like this ...
As a general helper on the Unity GUI system, here's a link to my GUI crash course
I created them in an editor script I believe.
Currently the integration test results are just displayed in the side panel with information limited to "test failed" or "test passed" for the individual tests. I want to be able to display more detailed test results. Not sure how to extract the information but if I could then I guess it would be easy to display with a TextArea like you mentioned.
The current setup is I hit cmd+shift+t which opens the GUI that I created in an editor script. This GUI contains buttons that all correspond to an integration test scene. When you click one, it opens the scene and opens the built in integration test runner from Unity test tools. Then you hit play and it runs the tests as usual.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Build a game from Illegal Unity 0 Answers
How can I fix the Unity Bug 1 Answer
Unity Editor Inspector creating gameObjects in world 2 Answers