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

Recover panel for deleted test #404

Open
wants to merge 5 commits into
base: development
Choose a base branch
from

Conversation

pcanelas
Copy link

@pcanelas pcanelas commented Oct 26, 2024

Description of changes made

This PR implements the functionality for recovering a test case after it is deleted by the user. The changes made are described as follows.

  • Updated the Remove button actionListener to create a the recover panel for the deleted test case at the end of the panel. The intuition is that Removed Test Cases are less important to the user, therefore, they are deprioritized.
  • Added a method for creating a recover panel, with the name of the test case deleted and a Recover button.
  • Added logic for Recover button that re-adds the test case with the same previous configurations. Furthermore, if the test case was previously executed, it automatically adds the coverage.
  • Logic for number of Tests Selected and Generated is updated, accordingly.

Why is merge request needed

Currently, deletion is a permanent action from the user -- and users often avoid functionalities that are permanent. In this case, since the unit generation relies on large language models or EvoSuite, permanently removing the test case may be either expensive (if using a base model, like GPT-4) or time-consuming, respectively, if they'd like to restore the test case.

Adding a recover button improves the user experience and avoids the previous issues.

Screenshot 2024-10-26 at 11 53 34

Other notes

Closes #230

What is missing?

  • The interface contains empty separators which should be removed. Improving the interface should be completed in following PRs.

  • I have checked that I am merging into correct branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add undo to test case removing
2 participants