EricB
EricB

Reputation: 1

GUnit builders fail because they are dependent on Admin Data, Producer Selection, Ratebooks, Forms Inference, integration calls. ...?

Much of our Guidewire code is 5+ years old and written in a very procedural and in a non unit style. When we first started writing GUnits (versions pre 10.0) they would query existing account and policy data to run the tests. Now that we are in GWCP we are attempting to create test data via builders instead of querying existing data. We are struggling to populate a complete, validated policy object which seems to be required in order to test most of our code.

It seems that tests start running before required/dependent data has finished loading. Builders that run in our local fail in TeamCity. Errors in TeamCity do not seem to indicate true cause of problems. We do not have any mocked service calls to utilize instead of test integration points. A single test can takeover 15 minutes to complete in locals because server start up and data loading runs for so long. The problems seem endless.

Are there best practices that could assist us? GW documentation seems to assume you are starting from scratch. Should we be refactoring code to a more unit testable style before we attempt to write tests? Are there anyways to avoid loading all of the different data we seem to be dependent on? How do we delay test execution until after data loading is complete?

It seems that these are not unit tests and we have a second type of automated system tests, are we just better off focusing on Designated Functions and GTFramework tests?

We have builders that can create a bound policy period for one of our policy lines in our local environments, but still trying to get this to work in Team City.

Upvotes: 0

Views: 48

Answers (0)

Related Questions