ImportToPath command (Import/Export tool)

Import a project item or test case to a TestArchitect project location identified by its TA path.

Restriction: The Import/Export tool is not available in the TestArchitect packages for the Linux and macOS operating systems.

Synopsis

java -jar TAImportExportTool.jar --ImportToPath [--server<value>] [--port<value>] --uid<value> 
--pwd<value> --repoName<value> --projectName<value> --sourceFile<value> --destinationFolder<value> 
[--overwrite<true|false>] [--includePictureChecks<yes|no>]
TAImportExportTool.jar
An executable .jar file used to invoke the Import/Export tool.
The file can be found at TA_INSTALL_DIR\binclient.
--ImportToPath
Invoke the import items function.
--server<value>
(Optional, default = localhost) Full hostname or IP address of the repository server hosting the repository into which the item is to be imported.
Note: If this argument is not defined, localhost is used as the default.
--port<value>
(Optional, default = 53400) Port number of the repository server.
Note:
  • If this argument is set to 0 or not defined, the default port number 53400 is used.
  • If port number of the source repository server has been changed from its TestArchitect default of 53400, ensure that the correct port number is specified.
--uid<value>
User name with which to log in to repository.
Note: If the user name contains any spaces, enclose it between a pair of double quotation marks.
--pwd<value>
Password for the given user name.
--repoName<value>
Name of the target repository.
Note: If the repository name contains any spaces, enclose it between a pair of double quotation marks..
--projectName<value>
Name of the target TestArchitect project.
Note: If the project name contains any spaces, enclose it between a pair of double quotation marks.
--sourceFile<value>
Path to file that is to be imported.
Note:
  • Network paths are also supported.
  • If the path contains any spaces, enclose it between a pair of double quotation marks.
--destinationFolder<value>
Location (TA path) of the project item root node (Tests, Data, etc.) or folder into which the item is to be imported.
Value must start with a forward slash ( / ), and provide a full (non-case sensitive) TA path, starting with the root project item node (e.g., Tests, Data, etc.)
For example: /Tests/Action-based Testing Basics/Data Driven Tests
Note:
  • The specified root node must match the type of project item being imported. (e.g., Data for data sets)
  • In the case of importing test cases, the path must end with the name of an existing test module.
  • In all but the case of importing test cases, a minimum allowable path consists of forward slash followed by the applicable root project item node.
  • If the destination path does not exist, it is generated automatically, with the exception of importation of test cases.
--overwrite<true|false>
(Optional, default = false) Specify whether the existing project item or test case, if any, should be overwritten.
Note: If this parameter is not specified, or its value is empty, its value defaults to false.
--includePictureChecks<yes|no>
(Optional, default = yes; applicable only to import of test module) Specifies whether the regular picture checks belonging to the source test module are to be included.
Note:
  • This parameter is only applicable for test modules. If the target item is not a test module, this parameter, if declared, is simply ignored.
  • Only a .zip file containing an exported test module can include that test module's picture checks. Hence a value of yes for this parameter is only effectual when the -sourceFile parameter specifies a .zip file.

Example: Importing test modules including regular picture checks

Ensure that you have installed or upgraded your Java Runtime Environment (JRE) to at least version 8, which is necessary to run TAImportExportTool.jar on your Windows machine.
Tip:
  • Refer to JRE 8 Installation for Microsoft Windows for details.
  • As an alternative to explicitly installing JDK 8, you may also use the Java Runtime Environment (JRE) packaged with TestArchitect at TA_INSTALL_DIR\jre\bin. In such a case, note that all invocations of the java command will need to specify its filepath (e.g., C:\Program Files\LogiGear\TestArchitect\jre\bin\java). (This latter step can be circumvented by setting the Windows environment variable JAVA_HOME to TA_INSTALL_DIR\jre\bin.)
Let's say you want to import a given test module, Action Based Testing, from a .zip file, with the following information and requirements:
  • Repository server's IP address: 192.168.167.60
  • Repository server's port number: 53400
  • Target repository name: SampleRepository
  • User name for account in repository: john
  • Password for the account: doe
  • Target project name: Car Rental
  • Include the test module's regular picture checks in the import.
  • File to import: D:\exported items\Action Based Testing_2015-09-22_10-22-49.zip
    Note: While test modules can be exported to & imported from .csv, .html and .zip files, only .zip files can hold regular picture checks from the source test module.
  • Destination folder in project: /Tests/Action-based Testing Basics/Data Driven Tests
  • Overwrite the existing Action Based Testing test module, if any.

To run the ImportToPath command, do the following:

  1. Bring up a command window. You can do this from the Windows Start menu by choosing Run, and then entering cmd. The command window opens with a prompt displaying your current directory.
  2. Use the cd command to change your current directory to TA_INSTALL_DIR\binclient\, which is where TAImportExportTool.jar is located. For example, type the following command at the prompt, and then press Enter.
    cd "C:\Program Files\LogiGear\TestArchitect\binclient"
    Now the prompt should change to the new directory, e.g., C:\Program Files\LogiGear\TestArchitect\binclient>
  3. Enter the following command, and then press Enter.
    java -jar TAImportExportTool.jar --ImportToPath --server 192.168.167.60 --port 53400 --uid john 
    --pwd doe --repoName SampleRepository --projectName "Car Rental" 
    --sourceFile "D:\exported items\Action Based Testing_2015-09-22_10-22-49.zip" 
    --destinationFolder "/Tests/Action-based Testing Basics/Data Driven Tests"
    --overwrite true --includePictureChecks yes