Hi all, I try understand how get screenshot in my “Functional Test” example. Always see message “New Screenshot ‘01’ was discovered! Please add a ground truth version of it.” Can someone to explain what this message means?
My main goal is implement “Screenshot as part of another Functional Test”, how I understated correct “ground truth” need add to first screenshot, but screenshot comparison always empty. Epic game please give video tutorial for testing (QA) it is very big problem, no any good information, guide not help.
I don’t think there’s a programmatic way though blueprints to get what you want to achieve natievly. You might have to edit a bit of the engine to functionally “Add” ground truths to your tests.
It may be easier to have test geneate the screenshots, gather all the updated screenshots that failed through a script outside of blueprints and have someone review and update the tests.
Avoid tests that have dynamic elements and geneate scenes/levels specic for test cases.
I try understated, why screenshot comparison not show my screenshot, in console I see how it make it, but folder and screenshot comparison is empty, this bug?
Did you ever manage to make it work? I’m also stuck with the same problem.
Hi Guiys, you have to Add your repository to version control(eg git)- ideally whole project (Unreal generates screenshots automatically based on the blueprint above) to project “tests” folder - after you run a function test.
First, connect your project directory to version control (you do not actually have to commit/push anything).
To do this, take a look at this link - Git Source Control Provider Plugin - Engine Source & GitHub - Unreal Engine Forums - most importantly - there you have to have your SourceControl enabled in Unreal - There is a big button on a main tab for it - https://www.zupimages.net/up/19/26/x8oc.png
The directory of the screenshot for me was something like:
As soon as you run the test for the first time in Session Frontend-> Automation, it will show a warning that you have no ground truth. Go to Session Frontend->Screen Comparison and check all the checkboxes (Show passed, Show Failed, Show new). Unreal will let you now press a button Add New! - which will from now on serve as a ground truth.
After this → Go to Automation again, rerun your tests and it will show the tests as passed. If you change something and the screenshots won’t match the tests will fail. To make a new ground truth go to the above-described directory and delete the previous ground truth manually if you like me can not do it through unreal buttons.
Hope this helped. Happy testing.