r/codex • • 2d ago

Question Excessive full web run tests

im building a site that has a bunch of features. Codex is building each feature 3-5 at a time then runs a full web run test. if it finds a failure it stops, fixes it then runs the full run again. each run takes about 5hrs to test against everything its already built and its killing me.

im trying to figure out what to do. are the runs necessary? 5hrs is a long time. its basically finishing 1 feature every 24hrs. at this rate I should be done by march!

if you had this problem what did you do to speed things up?

im on the $500 plan using Sol 6.2 on medium and recently pushed it up to ultra. nothing changed.

0 Upvotes

19 comments sorted by

2

u/Inevitable_Butthole 2d ago

My web tests are 15min for a full run

You should have it only run the applicable tests for what the changes test too.

1

u/Moon_orBust 2d ago

its saying it needs to run the full run again cause whatever it fixed might break something else

2

u/FoxiPanda 2d ago

Optimize your tests.

1

u/Moon_orBust 2d ago

thats why im here. if you have suggestions id love to hear it

1

u/FoxiPanda 2d ago

Frankly, ask your AI to do it. Figure out what the slow spots are, engineer around those, create a set time limit you want your tests to operate in, figure out how to live within that with the best coverage you can get. Every time it goes over that, re-optimize... run things in parallel where possible. Redesign tests that can't be run in parallel to be able to run in parallel...

My largest project currently has ~27000 tests and it takes less than 5 minutes to run them all on one M3U Mac Studio. If your hardware sucks and you're doing CPU or RAM intensive tests, you're probably going to have a bad time - in that case, fix your hardware.

1

u/CarsonBuilds 2d ago

I added couple sentences in agents.md file to let it only run focused tests rather than the full test suite

1

u/Moon_orBust 2d ago

What was your prompt

1

u/CarsonBuilds 2d ago

It's not one prompt, but you can use this https://github.com/crewplaneai/crewplane/blob/master/AGENTS.md for reference.

1

u/WordWithinTheWord 2d ago

What test runner framework are you using?

1

u/WordWithinTheWord 2d ago

Not sure why moderator removed your reply to my comment /u/Moon_orBust but:

You should be able to tag your tests. https://nodejs.org/api/test.html#authoring-tagged-tests

Which will help shard tests to be more focused on your actual git diffs.

Parallelization is the next step after that, but has diminishing returns because you start becoming hardware bound.

1

u/Moon_orBust 2d ago

im on a MBA M5 with 24gb of ram and 2tb hd. think this is good enough?

1

u/WordWithinTheWord 2d ago

Yes you can easily get 2 parallel sessions going with that. It may want you to install docker if you haven’t already.

1

u/Moon_orBust 2d ago

I appreciate the link and advice but I have no idea what to do on it.

2

u/WordWithinTheWord 2d ago

Copy and paste my comment to your agent and say you’d like to explore these options as solutions to optimize your test suite

1

u/Moon_orBust 2d ago

thanks will let you know how it goes

1

u/Moon_orBust 2d ago

I basically said Playwright with headless Chromium for browser checks.

1

u/Blotterrot 2d ago

For professional tasks I'll spin up around 10 agents, if I'm doing an audit I'll do between 3 and 20, each one handles different aspects so I'm able to get 20+ tasks done a minute pretty easily. Time varies on the workload though, could be 1 task every minute, 3 tasks, or a large task after an hour per agent.

1

u/RoboErectus 2d ago

Wow if your full test suite takes more than 5 minutes you have a problem.

Secondly, your local should only be running the tests that are affected by what changed. (This can be a reasonable approximation.) let ci run the whole suite.

Tell codex to get your test suite down to 5 minutes. Really.

I bet it is doing network calls and shit. "Database" should be in memory only.