Skip to content

Add failed testcases into testcase available for execution #16

@dvishal485

Description

@dvishal485

Feature request

Failed testcase should be added to a testcase file making it easier to run the code against those failed testcase.


Instructions

  • Automatically add the failed testcase during submission into failed.txt.
  • Overwrite the file everytime the user gets a failed testcase.
  • The testcase should not be appended in testcase.txt as it may contain test cases from a different question and also may exceed the test case limit (provided by Leetcode).
  • Whenever testcase is added in failed.txt, user should be shown appropriate message with command leetcode-runner-cli -r -t textcase.txt -f [codefile_name] which will execute the failed testcase.
  • This should only be triggered on failing submission and not on failing testcase.
  • The failed testcase is present as last_testcase (which is a String) in some variant struct of the enum SubmissionResult.
  • Make sure the string is non-empty before adding it into failed testcase.

Suggestion

To avoid code repetition, a trait can be used to define shared behaviour of these struct (the the variants of enum store) so they may invoke save_failed_testcase() method which does the job.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions