Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate 2 parametrized tests instead of test with if-else inside #1140

Open
alisevych opened this issue Oct 11, 2022 · 0 comments
Open

Generate 2 parametrized tests instead of test with if-else inside #1140

alisevych opened this issue Oct 11, 2022 · 0 comments
Labels
ctg-enhancement New feature, improvement or change request

Comments

@alisevych
Copy link
Member

alisevych commented Oct 11, 2022

Description

It's better to avoid conditions in tests.
Currently a parametrized test with if-else condition inside is generated.
The test changes the behavior basing on expected exception (NPE or not)

Expected behavior

It's better to avoid conditions and loops in tests where possible.
Suggestion for here: generate 2 parametrized tests: one expecting NPE and another one for other exceptions.

Environment

JRE 8 - 17 - ...

Context

Generate tests with UnitTestBot - RC build
with Parametrized tests checked

@korifey korifey moved this to Todo in UTBot Java Oct 11, 2022
@alisevych alisevych added the ctg-enhancement New feature, improvement or change request label Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-enhancement New feature, improvement or change request
Projects
Status: Todo
Development

No branches or pull requests

1 participant