Remix.run Logo
VectorLock 6 days ago

Parameterized tests are good, but I think he might be talking about exercising all the corner cases in the logic of your function, which to my knowledge almost no languages can auto-generate for but LLMs can sorta-ish figure it out.

mgh95 6 days ago | parent [-]

We are talking about basic computing for CRUD apps. When you start needing to rely upon "sorta-ish" to describe the efficacy or a tool for such a straightforward and deterministic use case, it may be an indicator you need to rethink your approach.

VectorLock 6 days ago | parent [-]

If you want to discount a tool that may save you an immense amount of time because you might have to help it along the fast few feet, thats up to you.

If you can share a tool that can analyze a function and create a test for all corner cases in a popular language, I'm sure some people would be interested in that.

mgh95 6 days ago | parent [-]

You should look up intellitest and reshaper test generator. Products exist for this.

imtringued 5 days ago | parent [-]

Maybe you should have brought that up earlier instead of acting smug and burying the lede? It's also pretty telling that you didn't elaborate this further and kept your comment short.

What you should have said is that some parameterized test generators do automated white box testing where they look at your code similar to a fuzzer and try to find the test cases automatically. Your first link is literally just setting up an array with test cases, which basically means you'd have to use an LLM to quickly produce the test cases anyway, which makes parameterized testing sound exceedingly pathetic.

https://learn.microsoft.com/en-us/visualstudio/test/generate...

>IntelliTest explores your .NET code to generate test data and a suite of unit tests. For every statement in the code, a test input is generated that will execute that statement. A case analysis is performed for every conditional branch in the code. For example, if statements, assertions, and all operations that can throw exceptions are analyzed. This analysis is used to generate test data for a parameterized unit test for each of your methods, creating unit tests with high code coverage. Think of it as smart fuzz testing that trims down the inputs and test cases to what executes all your logic branches and checks for exceptions.

mgh95 5 days ago | parent [-]

> Maybe you should have brought that up earlier instead of acting smug and burying the lede? It's also pretty telling that you didn't elaborate this further and kept your comment short.

I thought people were generally competent within the areas they discuss and are aware of the tooling within their preferred ecosystem. I apologize if that is not the case.

VectorLock 5 days ago | parent [-]

Reshaper huh...

"With AI Assistant, you can generate unit tests for C# methods."

https://www.jetbrains.com/help/resharper/Generate_tests.html