Unit Test failure: Non existent view: error0

I am writing a custom transformation snap to build a custom payload for one of our external systems. I have implemented the ErrorSchemaProvider interface and, following the patterns of the view names from the InputSchemaProvider and OutputSchemaProvider, I specified the view name as “error0”.

public void defineErrorSchema(final SchemaProvider provider) {
        .withChildSchema(provider.createSchema(SnapType.STRING, BAR_NUMBER))
        .withChildSchema(provider.createSchema(SnapType.STRING, ERROR_TYPE))
        .withChildSchema(provider.createSchema(SnapType.STRING, ERROR_MESSAGE))

Unfortunately, this is causing the unit test to fail with the error: Non existent view: error0

public class AddAttorneyPayloadBuilderTest {

@TestFixture(snap = AddAttorneyPayloadBuilder.class,
    input = "data/add_attorney/input.json",
    errors = { "error0" },
    expectedOutputPath = "data/add_attorney/expected",
    expectedErrorPath = "data/two_inputs_two_outputs/expected")
public void addAttorney_WithValidData_BuildsXmlPayload() { }


I am clearly doing something stupid. Any pointers at what I need to do to fix the problem?


Hi Robert,

No, you’re not doing anything stupid. You found another issue with our test harness, and it’s already been fixed. Please see the patch info here.

@ptaylor I followed the instructions to add the following properties to the POM but I am still getting the error.


Nevermind, I regenerated the project with the archetype this weekend and ended up with the older POM somehow…