Skip to content

Commit 2d36a73

Browse files
committed
updated test strategy
1 parent ac75de4 commit 2d36a73

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

TEST_STRATEGY.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Reports capture all console output, making it easy to review test runs and debug
217217

218218
5.**Gas Optimization**: Implemented robust gas estimation with buffers for testnet reliability
219219

220-
### For more comprehensive tests I would add the following
220+
### If I had more time:
221221

222222
1. **Gas Benchmarking**: More detailed gas cost analysis and optimization metrics.
223223
2. **Time Manipulation Edge Cases**: More comprehensive tests for deadline boundaries (exactly at deadline, 1 second before/after).
@@ -226,4 +226,23 @@ Reports capture all console output, making it easy to review test runs and debug
226226
5. **Event Indexing Tests**: Test event filtering and querying patterns that a real dApp would use.
227227
6. **CI/CD Integration**: Enhanced GitHub Actions workflow to run all test suites (Solidity + TypeScript) automatically.
228228

229+
### AI coding assistance:
229230

231+
**What worked well**:
232+
- Code structure suggestions: AI helped organize the contract structure with clear separation of concerns.
233+
- Test pattern generation: AI suggested good patterns for testing state transitions and edge cases.
234+
- Error handling: AI helped identify potential revert conditions and appropriate error messages.
235+
- General set-up: fixed to solve dependency issues and integration missoncfiguration
236+
- Compare various approaches beneffits vs disadvantages
237+
238+
**What did not work well**:
239+
- Complex logic refinement: Initial reveal logic was overcomplicated; required manual simplification.
240+
- Context preservation: Sometimes AI would lose track of the full game flow when making incremental changes.
241+
- Wehn debating scenario covers AI did missed a lot of edge case scenarios.
242+
- AI missed to understand the logic of the contract to what will happen if someone will not reveal in the reveal period ( as the funds where locked indefitinie). I had to redeploy a new contract with updated logic
243+
- Generated incorrect assertions based on my requirements. Also the assertions had to be double checked and enforced as scenarios passed even with incorrect values.
244+
245+
246+
**Overall**: In the end 90% ++ of the code here is generated by AI based on my requirements and I was the one overseeing, checking and reviewing all that is done. I am using cursor and usually I do use ts + etherjs ( +ABI of the contract) to interrecat with my needs and a lot of RPC "read" from chian methods to validate assertsion ( based on parsed events in 90% of the cases).
247+
My recent projects where I am testing a solver that does swap, I did found a cool set-up in golang with W3vm which I had no idea how it worked and did not knew go, but I managed with AI to make comprehensive tests done on eth fork and base fork, where I querry Dune for cowSwap last 30 days top 50 pairs sorted by USD value then create them into a JSON file with scenarios and feed it to this go set-up to execute scenarios on a forked state of eth or base chain.
248+
I would not be great at live coding but I can handle what ever task I have in front of me with the help of AI.

0 commit comments

Comments
 (0)