Skip to content

testform import

Ventana de terminal
testform [global options] import [options] <address> <remote-id>

The testform import command brings existing remote resources (e.g. GitHub Issues created manually in the web browser prior to adopting Testform) under Testform management without deleting or recreating them.

Option Default Description
-scope=<scope> testcase Target scope (testcase, testrun, or testplan).
-lock=false true Disables state locking during import.
-no-color false Disables colored console output.

Intelligent Code Reconstruction (Smart Diffing)

Section titled “Intelligent Code Reconstruction (Smart Diffing)”

When you import an existing issue:

  1. Testform queries the Provider API and reads the full title, body, labels, assignees, and milestone.
  2. It writes the binding to testform.state.
  3. If the scenario does NOT yet exist in your local .feature file, Testform will automatically reconstruct the Gherkin scenario and append it to your file!
  4. It compares the issue against defaults in main.yml and Background: to keep your code DRY.
Ventana de terminal
$ testform import -scope=testcase "auth.case.feature.@tc-5" 104
github_testcase.auth_case_feature__tc_5: Importing from ID "104"...
github_testcase.auth_case_feature__tc_5: Import prepared!
Prepared github_testcase for import on auth.case.feature.@tc-5
github_testcase.auth_case_feature__tc_5: Refreshing state... [id=104]
Import successful!
The resources that were imported are shown above. These resources are now in
your Testform state and will henceforth be managed by Testform.

After importing, run testform plan to verify that your local scenario code matches the imported state with zero drift.

  • 0: Resource successfully imported.
  • 1: Remote issue not found, or resource already managed in state.