Live data from Hacker News

Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

nexte.st

31–40 of 53 posts

Re: Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

#31
Super happy user here! It's an excellent piece of engineering.

We're running a fork that supports a "sidecar" server for running multiple integration tests against. So if any tests that need the server are included, it spawns the server, runs the integration tests, and then shuts it down. By re-using the same server we speed up our runs tremendously.

Discussion thread on gh: https://github.com/nextest-rs/nextest/discussions/3330

Re: Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

#32

Earlier quoted context omitted.

This is from the Kubernetes saying of "treat servers like cattle, not pets". Of course, some people like me keep cattle as pets, but then again I also name my servers, even the virtual or containerised ones.

It’s a horrible saying in that context also.

I mean, I like animals too, but in context it does make sense. The context was to treat them as "obtainable yet ultimately killable entities you keep as a group, not individuals", which cattle pretty much is. Unless you consider keeping cattle as draft animals, but I think that stopped being the main purpose a long time ago.

It got the point across, at a time where most people basically acquired servers, kept them until they died, and he was trying to push a development workflow where you constantly close("kill")/bring up new servers.

Re: Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

#33

Thanks for posting about this! I'm the main author of nextest, and it represents my best foot forward for how Rust testing should be done. Happy to answer questions though I might be a bit intermittent.

Big fan of nextest and this is my first time seeing this site. I'll be real I feel a bit ridiculous commenting this but you might want to consider rephrasing this: >Treat tests as cattle, not pets. Detect and terminate slow tests. Not sure saying, "hey, treat your tests as an animal you can kill at will" paints the right image.

It resonated with me!

Re: Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

#34

Thanks for posting about this! I'm the main author of nextest, and it represents my best foot forward for how Rust testing should be done. Happy to answer questions though I might be a bit intermittent.

Hey, I love nextest. But, perhaps because of the one-process per test approach, endpoint security solutions like CrowdStrike Falcon or Palo Alto Cortex tend to make computers hang whenever tests kick-in. I would love if you were able to introduce a workaround, because none of those companies will fix their stuff. I am guessing a possible mitigation would be to have stagger the first invocation of any large test binary, but I haven't had a chance to dig deep into this issue.

Re: Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

#35

Thanks for posting about this! I'm the main author of nextest, and it represents my best foot forward for how Rust testing should be done. Happy to answer questions though I might be a bit intermittent.

Big fan of nextest and this is my first time seeing this site. I'll be real I feel a bit ridiculous commenting this but you might want to consider rephrasing this: >Treat tests as cattle, not pets. Detect and terminate slow tests. Not sure saying, "hey, treat your tests as an animal you can kill at will" paints the right image.

Fungible/non fungible is a good alternative, and maybe the technically correct word. But I think in that case it doesn't apply and the change the author did is better.

Re: Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

#36

Thanks for posting about this! I'm the main author of nextest, and it represents my best foot forward for how Rust testing should be done. Happy to answer questions though I might be a bit intermittent.

Hey, I love nextest. But, perhaps because of the one-process per test approach, endpoint security solutions like CrowdStrike Falcon or Palo Alto Cortex tend to make computers hang whenever tests kick-in. I would love if you were able to introduce a workaround, because none of those companies will fix their stuff. I am guessing a possible mitigation would be to have stagger the first invocation of any large test binar…

Wouldn't running the tests in a container solve that issue? Or is that another thing that gets flagged?

Re: Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

#37

Earlier quoted context omitted.

Big fan of nextest and this is my first time seeing this site. I'll be real I feel a bit ridiculous commenting this but you might want to consider rephrasing this: >Treat tests as cattle, not pets. Detect and terminate slow tests. Not sure saying, "hey, treat your tests as an animal you can kill at will" paints the right image.

This is from the Kubernetes saying of "treat servers like cattle, not pets". Of course, some people like me keep cattle as pets, but then again I also name my servers, even the virtual or containerised ones.

That (unpleasant) saying predates Kubernetes by at least half a decade.

Re: Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

#38

Earlier quoted context omitted.

It’s a horrible saying in that context also.

I mean, I like animals too, but in context it does make sense. The context was to treat them as "obtainable yet ultimately killable entities you keep as a group, not individuals", which cattle pretty much is. Unless you consider keeping cattle as draft animals, but I think that stopped being the main purpose a long time ago. It got the point across, at a time where most people basically acquired servers, kept them un…

IMO, "make your servers fungible" is a better way to express the intent: slightly shorter, no metaphors, although "fungible" is a less common word. Maybe that's just me. (Edited to add: "make your tests fungible" has I think the wrong connotation; I think the original wording on the blog is about test executions -- and "make your test executions fungible" does seem like a good goal, similar to ACID guarantees for database transactions.)

Re: Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

#39
post #27

seems like `cargo nextest run` just runs `--lib` tests by default? however, `cargo test` is not so slow if you do `cargo test --lib`. how do I get nextest to execute the doc tests, too?

It looks like doctests aren't supported: https://github.com/nextest-rs/nextest/issues/16

Re: Cargo-nextest: 3x faster than cargo test, per-test isolation, first-class CI

#40
post #38

Earlier quoted context omitted.

I mean, I like animals too, but in context it does make sense. The context was to treat them as "obtainable yet ultimately killable entities you keep as a group, not individuals", which cattle pretty much is. Unless you consider keeping cattle as draft animals, but I think that stopped being the main purpose a long time ago. It got the point across, at a time where most people basically acquired servers, kept them un…

IMO, "make your servers fungible" is a better way to express the intent: slightly shorter, no metaphors, although "fungible" is a less common word. Maybe that's just me. (Edited to add: "make your tests fungible" has I think the wrong connotation; I think the original wording on the blog is about test executions -- and "make your test executions fungible" does seem like a good goal, similar to ACID guarantees for dat…

Before that, I used to call them "ephemeral", and of course half the people asked what "ephemeral" means, probably "fungible" would be met with similar question, unless the crowd is cryptocurrency-adjacent, that term seems understood there.
Post reply on HN