Skip to content

Test framework installation before test generation #1570 #1584

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

Merged
merged 5 commits into from
Feb 1, 2023

Conversation

tamarinvs19
Copy link
Collaborator

@tamarinvs19 tamarinvs19 commented Dec 23, 2022

Description

Added message "(will be installed)" for pytest (if it wasn't installed) and installation before test generation.

Fixes #1570

Type of Change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Regression and integration tests

Manual Scenario

  1. Open new python project
  2. Open UtBot action window to generate tests for some function
  3. Choose pytest in the test framework field. Expected: row with pytest contains (will be installed)
  4. Run test generation
  5. Check that installed modules include pytest: for example, write in python file next code
import pytest

Expected: IntelliJ IDEA doesn't underline error in import

Checklist (remove irrelevant options):

This is the author self-check list

  • The change followed the style guidelines of the UTBot project
  • Self-review of the code is passed
  • The change contains enough commentaries, particularly in hard-to-understand areas
  • No new warnings
  • New tests have been added
  • All tests pass locally with my changes

@tamarinvs19 tamarinvs19 added the lang-python Issue is related to python support label Dec 23, 2022
return panel
}

private fun updateTestFrameworksList() {
testFrameworks.renderer = object : ColoredListCellRenderer<TestFramework>() {
override fun customizeCellRenderer(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is duplication of the same code from GenerateTestsDialogWindow. Looks like we can extract and reuse the renderer. Or even the dialog.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I extracted this code to function and moved it to utbot-ui-common module

@alisevych alisevych added ctg-enhancement New feature, improvement or change request comp-ui Improvements of plugin UI appearence and functionality labels Jan 24, 2023
@tamarinvs19 tamarinvs19 merged commit 52acdb2 into main Feb 1, 2023
@tamarinvs19 tamarinvs19 deleted the tamarinvs19/test_framework_module_installation branch February 1, 2023 06:28
@alisevych alisevych added this to the 2023.03 Release milestone Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-ui Improvements of plugin UI appearence and functionality ctg-enhancement New feature, improvement or change request lang-python Issue is related to python support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest to add pytest package to the project when this framework is selected
3 participants