Skip to content

Fix test framework loading from settings file#2252

Merged
tamarinvs19 merged 2 commits into
mainfrom
tamarinvs19/fix-test-framework-settings
Jun 1, 2023
Merged

Fix test framework loading from settings file#2252
tamarinvs19 merged 2 commits into
mainfrom
tamarinvs19/fix-test-framework-settings

Conversation

@tamarinvs19

Copy link
Copy Markdown
Collaborator

Description

Changed loading of the test framework settings from config file:

  1. We parse text representation of the saved test framework
  2. If it is not for java (Junit5, Junit4, Testng) we interpret as UnknownTestFramework
  3. Then in Python and in Java UI logic we transform UnknownTestFramework to real test framework throw JavaTestFrameworkMapper or PythonTestFrameworkMapper

Fixes #1563

How to test

Manual tests

See #1563 and:

  1. Open java project in IntelliJ IDEA
  2. Check that test framework in UTBot UI is Junit4/5/Testng
  3. Switch off experimental languages in UTBot settings
  4. Close IDE and reopen python project and switch on experimental languages support
  5. Try to generate tests with pytest (expected: tests have been created)
  6. Close IDE and reopen python project
  7. Check that experimental languages is active and default test framework is pytest
  8. Close IDE again and reopen java project
  9. Check that experimental language is active and there are no problems with java test framework

Self-check list

Check off the item if the statement is true. Hint: [x] is a marked item.

Please do not delete the list or its items.

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@tamarinvs19 tamarinvs19 added lang-python Issue is related to python support comp-settings Issue is related to settings lang-java Issue is related to Java support ctg-bug-fix PR is fixing a bug labels Jun 1, 2023
@tamarinvs19 tamarinvs19 self-assigned this Jun 1, 2023
@tamarinvs19 tamarinvs19 changed the title Fix test framework loading from file Fix test framework loading from settings file Jun 1, 2023
@tamarinvs19 tamarinvs19 enabled auto-merge (squash) June 1, 2023 12:26
@tamarinvs19 tamarinvs19 merged commit a209473 into main Jun 1, 2023
@tamarinvs19 tamarinvs19 deleted the tamarinvs19/fix-test-framework-settings branch June 1, 2023 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-settings Issue is related to settings ctg-bug-fix PR is fixing a bug lang-java Issue is related to Java support lang-python Issue is related to python support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remember selection of dialog options for Python test generation

2 participants