We run lots (~4200) of tests every time an engineer at Even makes a pull request. At first, running all of those tests was slow and required a bunch of complicated support code. But since I joined in October 2018, we have totally revamped the way we run tests. This post tells the story of how we made testing faster and easier on our backend services. If you're interested in learning more, or want to help us improve testing our React Native mobile apps, we're hiring.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type PayrollModel interface { | |
Get(context.Context) (*Payroll, error) | |
} | |
func NewPayrollModel(dbx db.SQLExecutor) PayrollModel { | |
return &payrollModelImpl{db: db} | |
} | |
type payrollModelImpl struct { | |
db db.SQLExecutor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type PayrollModel interface { | |
GetPayrollForCustomerID(context.Context, CustomerID) (*Payroll, error) | |
InsertOrUpdatePayroll(context.Context, UpsertPayrollInput) error | |
} | |
type payrollModelImpl struct { | |
dbx db.SQLExecutor | |
} | |
func (impl *payrollModelImpl) GetPayrollForCustomerID(ctx context.Context, CustomerID) (*Payroll, error) { |