Unit testing blueprints with Automation System
I'm currently working on a plugin for an online service that is made up of native C++ and a Blueprint wrapper layer. I've just got to the stage where I need to automate testing of the various functions on our build server. It's fairly straightforward to setup and test the C++ functions, but I'm at as loss as to the best way to test the Blueprint wrapper.
I need to be able to do this through the Automation System to allow the tests to execute when building on the automated build server. Is there a way that I could load a "Unit test" scene and execute the blueprints though there? Or is there a better option? Any advice would be greatly appreciated.
asked Sep 16 '15 at 09:15 PM in Packaging & Deployment
Thanks for getting back to me so quickly. The proxy object is not being used for anything else, so yes I'm just looking to confirm the blueprint calls are working correctly. Most of the BP calls are straight pass though to the C++, but others do some conversion of types and such so we just need to make sure everything works.
I've actually been working on setting up a blueprint as a unit test framework. It currently consists of several blueprints that contain all the methods to test, plus a master test blueprint that manages logging errors/success and cycling through the test blueprints.
As long as I can load and execute that via the automation system I should be good to go. I'll dig through the source and docs you mentioned and see if I can hook it up.
answered Sep 29 '15 at 09:19 PM
In 4.14 they made some changes to the functional testing so it's now more or less usable to write some basic tests in the blueprints ( I made a video demonstrating this https://www.youtube.com/watch?v=f4LpDXjFgVQ ) . Should be possible to test any blueprint with it, we'd just need to add some assertions on top of this functional test to make this more "unit-testing" like.
answered Nov 19 '16 at 02:56 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here