The relationship between tests, testdata, transforms and generated code is unclear. It's hard to tell what is actually being tested, and how to add a new test.
Removing sysl transforms altogether will help remove one level of indirection, but there's still some need for structure.
sysl-go is kind of a library for generating applications, so testing is not straightforward.
Approaches
Three levels of testing:
comprehensive standard unit testing for implementation details of the library logic
comprehensive integration testing for generated code with downstream mocks
some end-to-end system testing for at least one generated application
Ideally (at least as a principle) refactoring the structure of the generated code should have minimal impact on the tests. Tests should test behaviour, not structure, and the generated code should generally not need .
The default structure for an integration test should resemble a real app that uses sysl-go: generated code is separated from handwritten glue code, and tests are in the handwritten package. Private generated code should stay private.
Problem
The relationship between tests, testdata, transforms and generated code is unclear. It's hard to tell what is actually being tested, and how to add a new test.
Removing sysl transforms altogether will help remove one level of indirection, but there's still some need for structure.
sysl-go is kind of a library for generating applications, so testing is not straightforward.
Approaches