| ▲ | suzzer99 3 hours ago | |
I've always thought that writing good tests (unit, integration or e2e) is harder than the actual coding by maybe an order of magnitude. The tricky part of unit tests is coming up with creative mocks and ways to simulate various situations based on the input data, w/o touching the actual code. For integration tests, it's massaging the test data and inputs to hit every edge case of an endpoint. For e2e tests, it's massaging the data, finding selectors that aren't going to break every time the html is changed, and trying to winnow down to the important things to test - since exhaustive e2e tests need hours to run and are a full-time job to maintain. You want to test all the main flows, but also stuff like handling a back-end system failure - which doesn't get tested in smoke tests or normal user operations. That's a ton of creativity for AI to handle. You pretty much have to tell it every test and how to build it. | ||