Instructions by Kari Kauppinen for importing test cases using Kettle tool.
Configuration Files
Download configuration files in zip package.
Instructions
First I created an “import” user for mysql
mysql -u root use testia; CREATE USER 'testia'@'%' IDENTIFIED BY 'testia'; GRANT ALL PRIVILEGES ON *.* TO 'testia'@'%';
Then altered the steps table:
alter table steps add column external_id varchar(255); alter table step_versions add column external_id varchar(255);
Then edited the .kettle.properties file
TESTIA_MYSQL_SERVER=172.30.180.8 TESTIA_MYSQL_DB=testia TESTIA_MYSQL_PWD=Encrypted 2be98afc86aa7f2e4cb79ba75cd86a6db TESTIA_MYSQL_USER=testia
I have included this in the zip-file.
TESTIA_MYSQL_PWD = testia
If you want to change this use encr.sh/encr.bat file from kettle main directory.
encr.sh -kettle password
this returns the “encrypted Passwordinencryptedformat”
The Cases and steps are in the excel-file. You should check the project field to match your tarantula project id.
I have zipped the Kettle repository from C:\TEMP\Testia
Download kettle from kettle.pentaho.com (4.2.1 version)
unzip it into C:\program files\pentaho\data-integration
run the C:\temp\Testia\import.bat
If you unzip to different folder change .kettle/repositories.xml line:
<base_directory>c:\path</base_directory>
If you are using linux:
create directory /opt/repo/ unzip the Testia.zip to /opt/repo
You should have directory /opt/repo/Testia
import.sh looks like (remove the — signs) :
#!/bin/sh PENTAHO_PATH=/opt/pentaho/data-integration KITCHEN=kitchen.sh export KETTLE_HOME=$( cd "$( dirname "$0" )" && pwd ) $PENTAHO_PATH/$KITCHEN -rep="Testia" -job="Import_data" -param:IMPORT_FILE="Cases_Steps.xls"
Change PENTAHO_PATH to match your installation
change .kettle/repositories.xml line:
<base_directory>/opt/repo/Testia</base_directory>
Run the import.sh from the /opt/repo/Testia
Original support thread
https://getsatisfaction.com/prove/topics/importing_of_test_cases