Skip to main content
added 9 characters in body
Source Link
Classified
  • 223
  • 3
  • 8

I am asking in case I run into this scenario in the future.

Someone in my company wrote multiple methods with 25 parameters. I don't know how/why it got thru code review. I'm just wondering how someone would write unit test cases in junit for this? The number of combinations/permutations would be crazy.

I know the real solution is to rewrite/refactor the methods to do less but I don't think this team plans to do this for now. If I were the poor test engineer assigned to write automated unit tests for this, how would one go about this?

I am asking in case I run into this scenario in the future.

Someone in my company wrote multiple methods with 25 parameters. I don't know how/why it got thru code review. I'm just wondering how someone would write unit test cases in junit for this? The number of combinations/permutations would be crazy.

I know the real solution is to rewrite the methods to do less but I don't think this team plans to do this for now. If I were the poor test engineer assigned to write automated unit tests for this, how would one go about this?

I am asking in case I run into this scenario in the future.

Someone in my company wrote multiple methods with 25 parameters. I don't know how/why it got thru code review. I'm just wondering how someone would write unit test cases in junit for this? The number of combinations/permutations would be crazy.

I know the real solution is to rewrite/refactor the methods to do less but I don't think this team plans to do this for now. If I were the poor test engineer assigned to write automated unit tests for this, how would one go about this?

Tweeted twitter.com/StackSQA/status/1018964075605364736
Source Link
Classified
  • 223
  • 3
  • 8

How to write unit test for methods with a large number of parameters?

I am asking in case I run into this scenario in the future.

Someone in my company wrote multiple methods with 25 parameters. I don't know how/why it got thru code review. I'm just wondering how someone would write unit test cases in junit for this? The number of combinations/permutations would be crazy.

I know the real solution is to rewrite the methods to do less but I don't think this team plans to do this for now. If I were the poor test engineer assigned to write automated unit tests for this, how would one go about this?