Data Store DDLs
When manually running these DDLs, begin with the 2.2.0 DDLs, followed by 2.3.0, 2.5.0 and lastly 2.7.0.
JDBC Database DDLs
MySql for Cycle version 2.2.0 (Run first)
CREATE TABLE cycle_test_execution (
execution_id varchar(100) NOT NULL,
execution_start_ts datetime(3) NOT NULL,
cycle_user varchar(100) NOT NULL,
cycle_version varchar(100) NOT NULL,
hardware_id varchar(100) NOT NULL,
computer_username varchar(100) NOT NULL,
os varchar(100) NOT NULL,
invoker varchar(100) NOT NULL,
PRIMARY KEY (execution_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE cycle_execution_results (
execution_id varchar(100) NOT NULL,
node_id varchar(255) NOT NULL,
parent_node_id varchar(255) DEFAULT NULL,
sending_node_id varchar(255) NOT NULL,
node_sequence int(11) NOT NULL,
node_type varchar(100) NOT NULL,
block_type varchar(100) DEFAULT NULL,
name TEXT DEFAULT NULL,
status varchar(100) NOT NULL,
message TEXT DEFAULT NULL,
error_message TEXT DEFAULT NULL,
file_uri TEXT DEFAULT NULL,
start_line int(11) DEFAULT NULL,
end_line int(11) DEFAULT NULL,
data_file_path TEXT DEFAULT NULL,
worker_name TEXT DEFAULT NULL,
tags TEXT DEFAULT NULL,
step_id varchar(100) DEFAULT NULL,
delay_start_time datetime(3) DEFAULT NULL,
start_time datetime(3) NOT NULL,
end_time datetime(3) DEFAULT NULL,
PRIMARY KEY (execution_id,node_id),
CONSTRAINT FK_cycle_execution_results FOREIGN KEY (execution_id) REFERENCES cycle_test_execution (execution_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE INDEX cycle_node_type_IDX ON cycle_execution_results (node_type) USING BTREE;;
CREATE INDEX cycle_parent_node_IDX ON cycle_execution_results (execution_id,parent_node_id) USING BTREE;;
CREATE INDEX cycle_sending_node_IDX ON cycle_execution_results (execution_id,sending_node_id) USING BTREE;;
CREATE VIEW cycle_execution_view AS
SELECT test.execution_id,
test.cycle_user,
test.os,
test.computer_username,
test.hardware_id,
test.cycle_version,
cyc_group.name as group_name,
cyc_group.data_file_path,
worker.worker_name,
dtl.node_id,
dtl.node_type,
dtl.name,
dtl.block_type,
dtl.tags,
dtl.status,
dtl.message,
dtl.error_message,
dtl.file_uri,
dtl.start_line,
dtl.end_line,
dtl.delay_start_time,
dtl.start_time,
dtl.end_time,
CEIL((dtl.end_time - dtl.start_time) * 1000) as duration,
CEIL((dtl.end_time - dtl.delay_start_time) * 1000) as duration_with_delay,
dtl.node_sequence
from cycle_test_execution as test
join cycle_execution_results as dtl
on test.execution_id = dtl.execution_id
and node_type not in ('Group','GroupTest','ConditionalBlock','ConditionalExpression')
left join (select execution_id, node_id, parent_node_id, sending_node_id, worker_name from cycle_execution_results where node_type = 'Feature') as worker
on dtl.execution_id = worker.execution_id
and dtl.sending_node_id = worker.node_id
left join (select execution_id, node_id, name, data_file_path from cycle_execution_results where node_type = 'Group') as cyc_group
on worker.execution_id = cyc_group.execution_id
and worker.parent_node_id = cyc_group.node_id;
MySql for Cycle version 2.3.0 (Run second)
CREATE TABLE cycle_image (
id varchar(100) NOT NULL,
image LONGBLOB,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE cycle_image_results (
id varchar(100) NOT NULL,
execution_id varchar(100) NOT NULL,
node_id varchar(255) NOT NULL,
template_file TEXT,
template_image_id varchar(100) DEFAULT NULL,
screenshot_image_id varchar(100) DEFAULT NULL,
found_image BOOL DEFAULT NULL,
min_value DOUBLE DEFAULT NULL,
max_value DOUBLE DEFAULT NULL,
min_location_x int(11) DEFAULT NULL,
min_location_y int(11) DEFAULT NULL,
max_location_x int(11) DEFAULT NULL,
max_location_y int(11) DEFAULT NULL,
source_width int(11) DEFAULT NULL,
source_height int(11) DEFAULT NULL,
template_width int(11) DEFAULT NULL,
template_height int(11) DEFAULT NULL,
correlation_threshold DOUBLE DEFAULT NULL,
PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_IMAGE_RESULTS FOREIGN KEY (execution_id, node_id) REFERENCES cycle_execution_results (execution_id,node_id) ,
CONSTRAINT FK_CYCLE_TERMINAL_T FOREIGN KEY (template_image_id) REFERENCES cycle_image (id) ,
CONSTRAINT FK_CYCLE_TERMINAL_S FOREIGN KEY (screenshot_image_id) REFERENCES cycle_image (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE cycle_terminal_screens (
id varchar(100) NOT NULL,
execution_id varchar(100) NOT NULL,
node_id varchar(255) NOT NULL,
screen TEXT,
PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_TERMINAL FOREIGN KEY (execution_id,node_id) REFERENCES cycle_execution_results (execution_id,node_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE cycle_file_diagnostics (
id varchar(100) NOT NULL,
execution_id varchar(100) NOT NULL,
node_id varchar(255) NOT NULL,
start_line int(11),
start_character int(11),
end_line int(11),
end_character int(11),
message TEXT,
severity varchar(100),
code int(11),
source TEXT,
PRIMARY KEY (id) ,
CONSTRAINT FK_FILE_DIAGNOSTICS FOREIGN KEY (execution_id,node_id) REFERENCES cycle_execution_results (execution_id,node_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
MySql for Cycle version 2.5.0 (Run third)
CREATE TABLE data_type_lookup (
id int(11) NOT NULL ,
datatype_desc varchar(100) NOT NULL ,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
insert into data_type_lookup values (1, 'STRING');
insert into data_type_lookup values (2, 'INT');
insert into data_type_lookup values (3, 'FLOAT');
CREATE TABLE test_plan (
id varchar(100) NOT NULL ,
name varchar(255) NOT NULL ,
is_default BOOL ,
description TEXT ,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE test_data_tag (
id varchar(100) NOT NULL ,
name varchar(255) NOT NULL ,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE test_data_set (
id varchar(100) NOT NULL ,
test_plan_id varchar(100) NOT NULL ,
name varchar(255) NOT NULL ,
description TEXT ,
PRIMARY KEY (id) ,
CONSTRAINT test_data_set_FK FOREIGN KEY (test_plan_id) REFERENCES test_plan (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE UNIQUE INDEX test_data_set_UN ON test_data_set (test_plan_id,name) USING BTREE;
CREATE TABLE test_data_column (
id varchar(100) NOT NULL ,
test_data_set_id varchar(100) NOT NULL ,
name varchar(255) NOT NULL ,
datatype int(11) NOT NULL ,
sort_sequence int(11) NOT NULL ,
PRIMARY KEY (id) ,
CONSTRAINT test_data_column_FK FOREIGN KEY (test_data_set_id) REFERENCES test_data_set (id) ,
CONSTRAINT test_data_type_FK FOREIGN KEY (datatype) REFERENCES data_type_lookup (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE test_data_record (
id varchar(100) NOT NULL ,
test_data_set_id varchar(100) NOT NULL ,
sort_sequence int(11) NOT NULL ,
PRIMARY KEY (id) ,
CONSTRAINT test_data_record_FK FOREIGN KEY (test_data_set_id) REFERENCES test_data_set (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE test_data_record_tag (
id varchar(100) NOT NULL ,
test_data_tag_id varchar(100) NOT NULL ,
test_data_record_id varchar(100) NOT NULL ,
PRIMARY KEY (id) ,
CONSTRAINT test_data_tag_FK FOREIGN KEY (test_data_tag_id) REFERENCES test_data_tag (id) ,
CONSTRAINT test_data_record_tag_FK FOREIGN KEY (test_data_record_id) REFERENCES test_data_record (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE test_data_value (
id varchar(100) NOT NULL ,
test_data_record_id varchar(100) NOT NULL ,
test_data_column_id varchar(100) NOT NULL ,
data_value TEXT ,
PRIMARY KEY (id) ,
CONSTRAINT test_data_record_val_FK FOREIGN KEY (test_data_record_id) REFERENCES test_data_record (id) ,
CONSTRAINT test_data_column_val_FK FOREIGN KEY (test_data_column_id) REFERENCES test_data_column (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
MySql for Cycle version: 2.7.0 (Run fourth)
ALTER TABLE test_data_tag
ADD CONSTRAINT test_data_tag_UC UNIQUE (name);
ALTER TABLE test_data_column
ADD CONSTRAINT test_data_column_UC UNIQUE (test_data_set_id,name);
SqlServer for Cycle version 2.2.0 (Run first)
CREATE TABLE cycle_test_execution (
execution_id nvarchar(100) NOT NULL,
execution_start_ts datetime2(7) NOT NULL,
cycle_user nvarchar(100) NOT NULL,
cycle_version nvarchar(100) NOT NULL,
hardware_id nvarchar(100) NOT NULL,
computer_username nvarchar(100) NOT NULL,
os nvarchar(100) NOT NULL,
invoker nvarchar(100) NOT NULL,
CONSTRAINT PK_test_execution PRIMARY KEY (execution_id)
) ;
CREATE TABLE cycle_execution_results (
execution_id nvarchar(100) NOT NULL,
node_id nvarchar(255) NOT NULL,
parent_node_id nvarchar(255) DEFAULT NULL,
sending_node_id nvarchar(255) NOT NULL,
node_sequence int NOT NULL,
node_type nvarchar(100) NOT NULL,
block_type nvarchar(100) DEFAULT NULL,
name TEXT DEFAULT NULL,
status nvarchar(100) NOT NULL,
message TEXT DEFAULT NULL,
error_message TEXT DEFAULT NULL,
file_uri TEXT DEFAULT NULL,
start_line int DEFAULT NULL,
end_line int DEFAULT NULL,
data_file_path TEXT DEFAULT NULL,
worker_name TEXT DEFAULT NULL,
tags TEXT DEFAULT NULL,
step_id nvarchar(100) DEFAULT NULL,
delay_start_time datetime2(7) DEFAULT NULL,
start_time datetime2(7) NOT NULL,
end_time datetime2(7) DEFAULT NULL,
CONSTRAINT PK_cycle_execution_results PRIMARY KEY (execution_id,node_id),
CONSTRAINT FK_cycle_execution_results FOREIGN KEY (execution_id) REFERENCES cycle_test_execution(execution_id)
) ;
CREATE INDEX cycle_node_type_IDX ON cycle_execution_results (node_type);;
CREATE INDEX cycle_parent_node_IDX ON cycle_execution_results (execution_id,parent_node_id);;
CREATE INDEX cycle_sending_node_IDX ON cycle_execution_results (execution_id,sending_node_id);;
CREATE VIEW cycle_execution_view AS
SELECT test.execution_id,
test.cycle_user,
test.os,
test.computer_username,
test.hardware_id,
test.cycle_version,
cyc_group.name as group_name,
cyc_group.data_file_path,
worker.worker_name,
dtl.node_id,
dtl.node_type,
dtl.name,
dtl.block_type,
dtl.tags,
dtl.status,
dtl.message,
dtl.error_message,
dtl.file_uri,
dtl.start_line,
dtl.end_line,
dtl.delay_start_time,
dtl.start_time,
dtl.end_time,
DATEDIFF(millisecond, dtl.start_time, dtl.end_time) as duration,
DATEDIFF(millisecond, dtl.delay_start_time, dtl.end_time) as duration_with_delay,
dtl.node_sequence
from cycle_test_execution as test
join cycle_execution_results as dtl
on test.execution_id = dtl.execution_id
and node_type not in ('Group','GroupTest','ConditionalBlock','ConditionalExpression')
left join (select execution_id, node_id, parent_node_id, sending_node_id, worker_name from cycle_execution_results where node_type = 'Feature') as worker
on dtl.execution_id = worker.execution_id
and dtl.sending_node_id = worker.node_id
left join (select execution_id, node_id, name, data_file_path from cycle_execution_results where node_type = 'Group') as cyc_group
on worker.execution_id = cyc_group.execution_id
and worker.parent_node_id = cyc_group.node_id;
SqlServer for Cycle version 2.3.0 (Run second)
CREATE TABLE cycle_image (
id nvarchar(100) NOT NULL,
image varbinary(MAX),
CONSTRAINT PK_CYCLE_IMAGE PRIMARY KEY (id)
) ;
CREATE TABLE cycle_image_results (
id nvarchar(100) NOT NULL,
execution_id nvarchar(100) NOT NULL,
node_id nvarchar(255) NOT NULL,
template_file TEXT,
template_image_id nvarchar(100) DEFAULT NULL,
screenshot_image_id nvarchar(100) DEFAULT NULL,
found_image BIT DEFAULT NULL,
min_value FLOAT DEFAULT NULL,
max_value FLOAT DEFAULT NULL,
min_location_x int DEFAULT NULL,
min_location_y int DEFAULT NULL,
max_location_x int DEFAULT NULL,
max_location_y int DEFAULT NULL,
source_width int DEFAULT NULL,
source_height int DEFAULT NULL,
template_width int DEFAULT NULL,
template_height int DEFAULT NULL,
correlation_threshold FLOAT DEFAULT NULL,
CONSTRAINT PK_CYCLE_IMAGE_RESULTS PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_IMAGE_RESULTS FOREIGN KEY (execution_id, node_id) REFERENCES cycle_execution_results(execution_id,node_id) ,
CONSTRAINT FK_CYCLE_TERMINAL_T FOREIGN KEY (template_image_id) REFERENCES cycle_image(id) ,
CONSTRAINT FK_CYCLE_TERMINAL_S FOREIGN KEY (screenshot_image_id) REFERENCES cycle_image(id)
) ;
CREATE TABLE cycle_terminal_screens (
id nvarchar(100) NOT NULL,
execution_id nvarchar(100) NOT NULL,
node_id nvarchar(255) NOT NULL,
screen TEXT,
CONSTRAINT PK_CYCLE_TERMINAL PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_TERMINAL FOREIGN KEY (execution_id,node_id) REFERENCES cycle_execution_results(execution_id,node_id)
) ;
CREATE TABLE cycle_file_diagnostics (
id nvarchar(100) NOT NULL,
execution_id nvarchar(100) NOT NULL,
node_id nvarchar(255) NOT NULL,
start_line int,
start_character int,
end_line int,
end_character int,
message TEXT,
severity nvarchar(100),
code int,
source TEXT,
CONSTRAINT PK_FILE_DIAGNOSTICS PRIMARY KEY (id) ,
CONSTRAINT FK_FILE_DIAGNOSTICS FOREIGN KEY (execution_id,node_id) REFERENCES cycle_execution_results(execution_id,node_id)
) ;
SqlServer for Cycle version 2.5.0 (Run third)
CREATE TABLE data_type_lookup (
id int NOT NULL ,
datatype_desc nvarchar(100) NOT NULL ,
CONSTRAINT data_type_lookup_PK PRIMARY KEY (id)
) ;
insert into data_type_lookup values (1, 'STRING');
insert into data_type_lookup values (2, 'INT');
insert into data_type_lookup values (3, 'FLOAT');
CREATE TABLE test_plan (
id nvarchar(100) NOT NULL ,
name nvarchar(255) NOT NULL ,
is_default BIT ,
description TEXT ,
CONSTRAINT test_plan_PK PRIMARY KEY (id)
) ;
CREATE TABLE test_data_tag (
id nvarchar(100) NOT NULL ,
name nvarchar(255) NOT NULL ,
CONSTRAINT test_data_tag_PK PRIMARY KEY (id)
) ;
CREATE TABLE test_data_set (
id nvarchar(100) NOT NULL ,
test_plan_id nvarchar(100) NOT NULL ,
name nvarchar(255) NOT NULL ,
description TEXT ,
CONSTRAINT test_data_set_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_set_FK FOREIGN KEY (test_plan_id) REFERENCES test_plan(id)
) ;
CREATE UNIQUE INDEX test_data_set_UN ON test_data_set (test_plan_id,name);
CREATE TABLE test_data_column (
id nvarchar(100) NOT NULL ,
test_data_set_id nvarchar(100) NOT NULL ,
name nvarchar(255) NOT NULL ,
datatype int NOT NULL ,
sort_sequence int NOT NULL ,
CONSTRAINT test_data_column_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_column_FK FOREIGN KEY (test_data_set_id) REFERENCES test_data_set(id) ,
CONSTRAINT test_data_type_FK FOREIGN KEY (datatype) REFERENCES data_type_lookup(id)
) ;
CREATE TABLE test_data_record (
id nvarchar(100) NOT NULL ,
test_data_set_id nvarchar(100) NOT NULL ,
sort_sequence int NOT NULL ,
CONSTRAINT test_data_record_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_record_FK FOREIGN KEY (test_data_set_id) REFERENCES test_data_set(id)
) ;
CREATE TABLE test_data_record_tag (
id nvarchar(100) NOT NULL ,
test_data_tag_id nvarchar(100) NOT NULL ,
test_data_record_id nvarchar(100) NOT NULL ,
CONSTRAINT test_data_record_tag_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_tag_FK FOREIGN KEY (test_data_tag_id) REFERENCES test_data_tag(id) ,
CONSTRAINT test_data_record_tag_FK FOREIGN KEY (test_data_record_id) REFERENCES test_data_record(id)
) ;
CREATE TABLE test_data_value (
id nvarchar(100) NOT NULL ,
test_data_record_id nvarchar(100) NOT NULL ,
test_data_column_id nvarchar(100) NOT NULL ,
data_value TEXT ,
CONSTRAINT test_data_value_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_record_val_FK FOREIGN KEY (test_data_record_id) REFERENCES test_data_record(id) ,
CONSTRAINT test_data_column_val_FK FOREIGN KEY (test_data_column_id) REFERENCES test_data_column(id)
) ;
SqlServer for Cycle version: 2.7.0 (Run fourth)
ALTER TABLE test_data_tag
ADD CONSTRAINT test_data_tag_UC UNIQUE (name);
ALTER TABLE test_data_column
ADD CONSTRAINT test_data_column_UC UNIQUE (test_data_set_id,name);
Oracle for Cycle version 2.2.0 (Run first)
CREATE TABLE cycle_test_execution (
execution_id VARCHAR2(100) NOT NULL,
execution_start_ts timestamp(6) NOT NULL,
cycle_user VARCHAR2(100) NOT NULL,
cycle_version VARCHAR2(100) NOT NULL,
hardware_id VARCHAR2(100) NOT NULL,
computer_username VARCHAR2(100) NOT NULL,
os VARCHAR2(100) NOT NULL,
invoker VARCHAR2(100) NOT NULL,
CONSTRAINT PK_test_execution PRIMARY KEY (execution_id)
) ;
CREATE TABLE cycle_execution_results (
execution_id VARCHAR2(100) NOT NULL,
node_id VARCHAR2(255) NOT NULL,
parent_node_id VARCHAR2(255) DEFAULT NULL,
sending_node_id VARCHAR2(255) NOT NULL,
node_sequence int NOT NULL,
node_type VARCHAR2(100) NOT NULL,
block_type VARCHAR2(100) DEFAULT NULL,
name VARCHAR2(4000) DEFAULT NULL,
status VARCHAR2(100) NOT NULL,
message VARCHAR2(4000) DEFAULT NULL,
error_message VARCHAR2(4000) DEFAULT NULL,
file_uri VARCHAR2(4000) DEFAULT NULL,
start_line int DEFAULT NULL,
end_line int DEFAULT NULL,
data_file_path VARCHAR2(4000) DEFAULT NULL,
worker_name VARCHAR2(4000) DEFAULT NULL,
tags VARCHAR2(4000) DEFAULT NULL,
step_id VARCHAR2(100) DEFAULT NULL,
delay_start_time timestamp(6) DEFAULT NULL,
start_time timestamp(6) NOT NULL,
end_time timestamp(6) DEFAULT NULL,
CONSTRAINT PK_cycle_execution_results PRIMARY KEY (execution_id,node_id),
CONSTRAINT FK_cycle_execution_results FOREIGN KEY (execution_id) REFERENCES cycle_test_execution (execution_id)
) ;
CREATE INDEX cycle_node_type_IDX ON cycle_execution_results (node_type);;
CREATE INDEX cycle_parent_node_IDX ON cycle_execution_results (execution_id,parent_node_id);;
CREATE INDEX cycle_sending_node_IDX ON cycle_execution_results (execution_id,sending_node_id);;
CREATE VIEW cycle_execution_view AS
SELECT test.execution_id,
test.cycle_user,
test.os,
test.computer_username,
test.hardware_id,
test.cycle_version,
cyc_group.name as group_name,
cyc_group.data_file_path,
worker.worker_name,
dtl.node_id,
dtl.node_type,
dtl.name,
dtl.block_type,
dtl.tags,
dtl.status,
dtl.message,
dtl.error_message,
dtl.file_uri,
dtl.start_line,
dtl.end_line,
dtl.delay_start_time,
dtl.start_time,
dtl.end_time,
(sysdate + (dtl.end_time - dtl.start_time) * 1000 - sysdate) * 86400 as duration,
(sysdate + (dtl.end_time - dtl.delay_start_time) * 1000 - sysdate) * 86400 as duration_with_delay,
dtl.node_sequence
from cycle_test_execution test
join cycle_execution_results dtl
on test.execution_id = dtl.execution_id
and node_type not in ('Group','GroupTest','ConditionalBlock','ConditionalExpression')
left join (select execution_id, node_id, parent_node_id, sending_node_id, worker_name from cycle_execution_results where node_type = 'Feature') worker
on dtl.execution_id = worker.execution_id
and dtl.sending_node_id = worker.node_id
left join (select execution_id, node_id, name, data_file_path from cycle_execution_results where node_type = 'Group') cyc_group
on worker.execution_id = cyc_group.execution_id
and worker.parent_node_id = cyc_group.node_id;
Oracle for Cycle version 2.3.0 (Run second)
CREATE TABLE cycle_image (
id VARCHAR2(100) NOT NULL,
image BLOB,
CONSTRAINT PK_CYCLE_IMAGE PRIMARY KEY (id)
) ;
CREATE TABLE cycle_image_results (
id VARCHAR2(100) NOT NULL,
execution_id VARCHAR2(100) NOT NULL,
node_id VARCHAR2(255) NOT NULL,
template_file VARCHAR2(4000),
template_image_id VARCHAR2(100) DEFAULT NULL,
screenshot_image_id VARCHAR2(100) DEFAULT NULL,
found_image CHAR(1) DEFAULT NULL,
min_value BINARY_DOUBLE DEFAULT NULL,
max_value BINARY_DOUBLE DEFAULT NULL,
min_location_x int DEFAULT NULL,
min_location_y int DEFAULT NULL,
max_location_x int DEFAULT NULL,
max_location_y int DEFAULT NULL,
source_width int DEFAULT NULL,
source_height int DEFAULT NULL,
template_width int DEFAULT NULL,
template_height int DEFAULT NULL,
correlation_threshold BINARY_DOUBLE DEFAULT NULL,
CONSTRAINT PK_CYCLE_IMAGE_RESULTS PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_IMAGE_RESULTS FOREIGN KEY (execution_id, node_id) REFERENCES cycle_execution_results (execution_id,node_id) ,
CONSTRAINT FK_CYCLE_TERMINAL_T FOREIGN KEY (template_image_id) REFERENCES cycle_image (id) ,
CONSTRAINT FK_CYCLE_TERMINAL_S FOREIGN KEY (screenshot_image_id) REFERENCES cycle_image (id)
) ;
CREATE TABLE cycle_terminal_screens (
id VARCHAR2(100) NOT NULL,
execution_id VARCHAR2(100) NOT NULL,
node_id VARCHAR2(255) NOT NULL,
screen VARCHAR2(4000),
CONSTRAINT PK_CYCLE_TERMINAL PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_TERMINAL FOREIGN KEY (execution_id,node_id) REFERENCES cycle_execution_results (execution_id,node_id)
) ;
CREATE TABLE cycle_file_diagnostics (
id VARCHAR2(100) NOT NULL,
execution_id VARCHAR2(100) NOT NULL,
node_id VARCHAR2(255) NOT NULL,
start_line int,
start_character int,
end_line int,
end_character int,
message VARCHAR2(4000),
severity VARCHAR2(100),
code int,
source VARCHAR2(4000),
CONSTRAINT PK_FILE_DIAGNOSTICS PRIMARY KEY (id) ,
CONSTRAINT FK_FILE_DIAGNOSTICS FOREIGN KEY (execution_id,node_id) REFERENCES cycle_execution_results (execution_id,node_id)
) ;
Oracle for Cycle version 2.5.0 (Run third)
CREATE TABLE data_type_lookup (
id int NOT NULL ,
datatype_desc VARCHAR2(100) NOT NULL ,
CONSTRAINT data_type_lookup_PK PRIMARY KEY (id)
) ;
insert into data_type_lookup values (1, 'STRING');
insert into data_type_lookup values (2, 'INT');
insert into data_type_lookup values (3, 'FLOAT');
CREATE TABLE test_plan (
id VARCHAR2(100) NOT NULL ,
name VARCHAR2(255) NOT NULL ,
is_default CHAR(1) ,
description VARCHAR2(4000) ,
CONSTRAINT test_plan_PK PRIMARY KEY (id)
) ;
CREATE TABLE test_data_tag (
id VARCHAR2(100) NOT NULL ,
name VARCHAR2(255) NOT NULL ,
CONSTRAINT test_data_tag_PK PRIMARY KEY (id)
) ;
CREATE TABLE test_data_set (
id VARCHAR2(100) NOT NULL ,
test_plan_id VARCHAR2(100) NOT NULL ,
name VARCHAR2(255) NOT NULL ,
description VARCHAR2(4000) ,
CONSTRAINT test_data_set_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_set_FK FOREIGN KEY (test_plan_id) REFERENCES test_plan (id)
) ;
CREATE UNIQUE INDEX test_data_set_UN ON test_data_set (test_plan_id,name);
CREATE TABLE test_data_column (
id VARCHAR2(100) NOT NULL ,
test_data_set_id VARCHAR2(100) NOT NULL ,
name VARCHAR2(255) NOT NULL ,
datatype int NOT NULL ,
sort_sequence int NOT NULL ,
CONSTRAINT test_data_column_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_column_FK FOREIGN KEY (test_data_set_id) REFERENCES test_data_set (id) ,
CONSTRAINT test_data_type_FK FOREIGN KEY (datatype) REFERENCES data_type_lookup (id)
) ;
CREATE TABLE test_data_record (
id VARCHAR2(100) NOT NULL ,
test_data_set_id VARCHAR2(100) NOT NULL ,
sort_sequence int NOT NULL ,
CONSTRAINT test_data_record_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_record_FK FOREIGN KEY (test_data_set_id) REFERENCES test_data_set (id)
) ;
CREATE TABLE test_data_record_tag (
id VARCHAR2(100) NOT NULL ,
test_data_tag_id VARCHAR2(100) NOT NULL ,
test_data_record_id VARCHAR2(100) NOT NULL ,
CONSTRAINT test_data_record_tag_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_tag_FK FOREIGN KEY (test_data_tag_id) REFERENCES test_data_tag (id) ,
CONSTRAINT test_data_record_tag_FK FOREIGN KEY (test_data_record_id) REFERENCES test_data_record (id)
) ;
CREATE TABLE test_data_value (
id VARCHAR2(100) NOT NULL ,
test_data_record_id VARCHAR2(100) NOT NULL ,
test_data_column_id VARCHAR2(100) NOT NULL ,
data_value VARCHAR2(4000) ,
CONSTRAINT test_data_value_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_record_val_FK FOREIGN KEY (test_data_record_id) REFERENCES test_data_record (id) ,
CONSTRAINT test_data_column_val_FK FOREIGN KEY (test_data_column_id) REFERENCES test_data_column (id)
) ;
Oracle for Cycle version: 2.7.0 (Run fourth)
ALTER TABLE test_data_tag
ADD CONSTRAINT test_data_tag_UC UNIQUE (name);
ALTER TABLE test_data_column
ADD CONSTRAINT test_data_column_UC UNIQUE (test_data_set_id,name);
H2 for Cycle version 2.2.0 (Run first)
CREATE TABLE cycle_test_execution (
execution_id VARCHAR(100) NOT NULL,
execution_start_ts TIMESTAMP NOT NULL,
cycle_user VARCHAR(100) NOT NULL,
cycle_version VARCHAR(100) NOT NULL,
hardware_id VARCHAR(100) NOT NULL,
computer_username VARCHAR(100) NOT NULL,
os VARCHAR(100) NOT NULL,
invoker VARCHAR(100) NOT NULL,
CONSTRAINT PK_test_execution PRIMARY KEY (execution_id)
) ;
CREATE TABLE cycle_execution_results (
execution_id VARCHAR(100) NOT NULL,
node_id VARCHAR(255) NOT NULL,
parent_node_id VARCHAR(255) DEFAULT NULL,
sending_node_id VARCHAR(255) NOT NULL,
node_sequence INT NOT NULL,
node_type VARCHAR(100) NOT NULL,
block_type VARCHAR(100) DEFAULT NULL,
name VARCHAR DEFAULT NULL,
status VARCHAR(100) NOT NULL,
message VARCHAR DEFAULT NULL,
error_message VARCHAR DEFAULT NULL,
file_uri VARCHAR DEFAULT NULL,
start_line INT DEFAULT NULL,
end_line INT DEFAULT NULL,
data_file_path VARCHAR DEFAULT NULL,
worker_name VARCHAR DEFAULT NULL,
tags VARCHAR DEFAULT NULL,
step_id VARCHAR(100) DEFAULT NULL,
delay_start_time TIMESTAMP DEFAULT NULL,
start_time TIMESTAMP NOT NULL,
end_time TIMESTAMP DEFAULT NULL,
CONSTRAINT PK_cycle_execution_results PRIMARY KEY (execution_id,node_id),
CONSTRAINT FK_cycle_execution_results FOREIGN KEY (execution_id) REFERENCES cycle_test_execution(execution_id)
) ;
CREATE INDEX cycle_node_type_IDX ON cycle_execution_results (node_type);;
CREATE INDEX cycle_parent_node_IDX ON cycle_execution_results (execution_id,parent_node_id);;
CREATE INDEX cycle_sending_node_IDX ON cycle_execution_results (execution_id,sending_node_id);;
CREATE VIEW cycle_execution_view AS
SELECT test.execution_id,
test.cycle_user,
test.os,
test.computer_username,
test.hardware_id,
test.cycle_version,
cyc_group.name as group_name,
cyc_group.data_file_path,
worker.worker_name,
dtl.node_id,
dtl.node_type,
dtl.name,
dtl.block_type,
dtl.tags,
dtl.status,
dtl.message,
dtl.error_message,
dtl.file_uri,
dtl.start_line,
dtl.end_line,
dtl.delay_start_time,
dtl.start_time,
dtl.end_time,
datediff('ms', dtl.start_time, dtl.end_time) as duration,
datediff('ms', dtl.delay_start_time, dtl.end_time) as duration_with_delay,
dtl.node_sequence
from cycle_test_execution as test
join cycle_execution_results as dtl
on test.execution_id = dtl.execution_id
and node_type not in ('Group','GroupTest','ConditionalBlock','ConditionalExpression')
left join (select execution_id, node_id, parent_node_id, sending_node_id, worker_name from cycle_execution_results where node_type = 'Feature') as worker
on dtl.execution_id = worker.execution_id
and dtl.sending_node_id = worker.node_id
left join (select execution_id, node_id, name, data_file_path from cycle_execution_results where node_type = 'Group') as cyc_group
on worker.execution_id = cyc_group.execution_id
and worker.parent_node_id = cyc_group.node_id;
H2 for Cycle version 2.3.0 (Run second)
CREATE TABLE cycle_image (
id VARCHAR(100) NOT NULL,
image LONGBLOB,
CONSTRAINT PK_CYCLE_IMAGE PRIMARY KEY (id)
) ;
CREATE TABLE cycle_image_results (
id VARCHAR(100) NOT NULL,
execution_id VARCHAR(100) NOT NULL,
node_id VARCHAR(255) NOT NULL,
template_file VARCHAR,
template_image_id VARCHAR(100) DEFAULT NULL,
screenshot_image_id VARCHAR(100) DEFAULT NULL,
found_image BOOLEAN DEFAULT NULL,
min_value DOUBLE DEFAULT NULL,
max_value DOUBLE DEFAULT NULL,
min_location_x INT DEFAULT NULL,
min_location_y INT DEFAULT NULL,
max_location_x INT DEFAULT NULL,
max_location_y INT DEFAULT NULL,
source_width INT DEFAULT NULL,
source_height INT DEFAULT NULL,
template_width INT DEFAULT NULL,
template_height INT DEFAULT NULL,
correlation_threshold DOUBLE DEFAULT NULL,
CONSTRAINT PK_CYCLE_IMAGE_RESULTS PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_IMAGE_RESULTS FOREIGN KEY (execution_id, node_id) REFERENCES cycle_execution_results(execution_id,node_id) ,
CONSTRAINT FK_CYCLE_TERMINAL_T FOREIGN KEY (template_image_id) REFERENCES cycle_image(id) ,
CONSTRAINT FK_CYCLE_TERMINAL_S FOREIGN KEY (screenshot_image_id) REFERENCES cycle_image(id)
) ;
CREATE TABLE cycle_terminal_screens (
id VARCHAR(100) NOT NULL,
execution_id VARCHAR(100) NOT NULL,
node_id VARCHAR(255) NOT NULL,
screen VARCHAR,
CONSTRAINT PK_CYCLE_TERMINAL PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_TERMINAL FOREIGN KEY (execution_id,node_id) REFERENCES cycle_execution_results(execution_id,node_id)
) ;
CREATE TABLE cycle_file_diagnostics (
id VARCHAR(100) NOT NULL,
execution_id VARCHAR(100) NOT NULL,
node_id VARCHAR(255) NOT NULL,
start_line INT,
start_character INT,
end_line INT,
end_character INT,
message VARCHAR,
severity VARCHAR(100),
code INT,
source VARCHAR,
CONSTRAINT PK_FILE_DIAGNOSTICS PRIMARY KEY (id) ,
CONSTRAINT FK_FILE_DIAGNOSTICS FOREIGN KEY (execution_id,node_id) REFERENCES cycle_execution_results(execution_id,node_id)
) ;
H2 for Cycle version 2.5.0 (Run third)
CREATE TABLE data_type_lookup (
id INT NOT NULL ,
datatype_desc VARCHAR(100) NOT NULL ,
CONSTRAINT data_type_lookup_PK PRIMARY KEY (id)
) ;
insert into data_type_lookup values (1, 'STRING');
insert into data_type_lookup values (2, 'INT');
insert into data_type_lookup values (3, 'FLOAT');
CREATE TABLE test_plan (
id VARCHAR(100) NOT NULL ,
name VARCHAR(255) NOT NULL ,
is_default BOOLEAN ,
description VARCHAR ,
CONSTRAINT test_plan_PK PRIMARY KEY (id)
) ;
CREATE TABLE test_data_tag (
id VARCHAR(100) NOT NULL ,
name VARCHAR(255) NOT NULL ,
CONSTRAINT test_data_tag_PK PRIMARY KEY (id)
) ;
CREATE TABLE test_data_set (
id VARCHAR(100) NOT NULL ,
test_plan_id VARCHAR(100) NOT NULL ,
name VARCHAR(255) NOT NULL ,
description VARCHAR ,
CONSTRAINT test_data_set_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_set_FK FOREIGN KEY (test_plan_id) REFERENCES test_plan(id)
) ;
CREATE UNIQUE INDEX test_data_set_UN ON test_data_set (test_plan_id,name);
CREATE TABLE test_data_column (
id VARCHAR(100) NOT NULL ,
test_data_set_id VARCHAR(100) NOT NULL ,
name VARCHAR(255) NOT NULL ,
datatype INT NOT NULL ,
sort_sequence INT NOT NULL ,
CONSTRAINT test_data_column_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_column_FK FOREIGN KEY (test_data_set_id) REFERENCES test_data_set(id) ,
CONSTRAINT test_data_type_FK FOREIGN KEY (datatype) REFERENCES data_type_lookup(id)
) ;
CREATE TABLE test_data_record (
id VARCHAR(100) NOT NULL ,
test_data_set_id VARCHAR(100) NOT NULL ,
sort_sequence INT NOT NULL ,
CONSTRAINT test_data_record_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_record_FK FOREIGN KEY (test_data_set_id) REFERENCES test_data_set(id)
) ;
CREATE TABLE test_data_record_tag (
id VARCHAR(100) NOT NULL ,
test_data_tag_id VARCHAR(100) NOT NULL ,
test_data_record_id VARCHAR(100) NOT NULL ,
CONSTRAINT test_data_record_tag_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_tag_FK FOREIGN KEY (test_data_tag_id) REFERENCES test_data_tag(id) ,
CONSTRAINT test_data_record_tag_FK FOREIGN KEY (test_data_record_id) REFERENCES test_data_record(id)
) ;
CREATE TABLE test_data_value (
id VARCHAR(100) NOT NULL ,
test_data_record_id VARCHAR(100) NOT NULL ,
test_data_column_id VARCHAR(100) NOT NULL ,
data_value VARCHAR ,
CONSTRAINT test_data_value_PK PRIMARY KEY (id) ,
CONSTRAINT test_data_record_val_FK FOREIGN KEY (test_data_record_id) REFERENCES test_data_record(id) ,
CONSTRAINT test_data_column_val_FK FOREIGN KEY (test_data_column_id) REFERENCES test_data_column(id)
) ;
H2 for Cycle version: 2.7.0 (Run fourth)
ALTER TABLE test_data_tag
ADD CONSTRAINT test_data_tag_UC UNIQUE (name);
ALTER TABLE test_data_column
ADD CONSTRAINT test_data_column_UC UNIQUE (test_data_set_id,name);
MOCA Database DDLs
MOCA SqlServer for Cycle version 2.2.0 (Run first)
CREATE TABLE uc_cycle_test_execution (
execution_id nvarchar(100) NOT NULL,
execution_start_ts datetime2(7) NOT NULL,
cycle_user nvarchar(100) NOT NULL,
cycle_version nvarchar(100) NOT NULL,
hardware_id nvarchar(100) NOT NULL,
computer_username nvarchar(100) NOT NULL,
os nvarchar(100) NOT NULL,
invoker nvarchar(100) NOT NULL,
CONSTRAINT PK_test_execution PRIMARY KEY (execution_id)
) ;
CREATE TABLE uc_cycle_execution_results (
execution_id nvarchar(100) NOT NULL,
node_id nvarchar(255) NOT NULL,
parent_node_id nvarchar(255) DEFAULT NULL,
sending_node_id nvarchar(255) NOT NULL,
node_sequence int NOT NULL,
node_type nvarchar(100) NOT NULL,
block_type nvarchar(100) DEFAULT NULL,
name TEXT DEFAULT NULL,
status nvarchar(100) NOT NULL,
message TEXT DEFAULT NULL,
error_message TEXT DEFAULT NULL,
file_uri TEXT DEFAULT NULL,
start_line int DEFAULT NULL,
end_line int DEFAULT NULL,
data_file_path TEXT DEFAULT NULL,
worker_name TEXT DEFAULT NULL,
tags TEXT DEFAULT NULL,
step_id nvarchar(100) DEFAULT NULL,
delay_start_time datetime2(7) DEFAULT NULL,
start_time datetime2(7) NOT NULL,
end_time datetime2(7) DEFAULT NULL,
CONSTRAINT PK_cycle_execution_results PRIMARY KEY (execution_id,node_id),
CONSTRAINT FK_cycle_execution_results FOREIGN KEY (execution_id) REFERENCES uc_cycle_test_execution(execution_id)
) ;
CREATE INDEX cycle_node_type_IDX ON uc_cycle_execution_results (node_type);;
CREATE INDEX cycle_parent_node_IDX ON uc_cycle_execution_results (execution_id,parent_node_id);;
CREATE INDEX cycle_sending_node_IDX ON uc_cycle_execution_results (execution_id,sending_node_id);;
CREATE VIEW uc_cycle_execution_view AS
SELECT test.execution_id,
test.cycle_user,
test.os,
test.computer_username,
test.hardware_id,
test.cycle_version,
cyc_group.name as group_name,
cyc_group.data_file_path,
worker.worker_name,
dtl.node_id,
dtl.node_type,
dtl.name,
dtl.block_type,
dtl.tags,
dtl.status,
dtl.message,
dtl.error_message,
dtl.file_uri,
dtl.start_line,
dtl.end_line,
dtl.delay_start_time,
dtl.start_time,
dtl.end_time,
DATEDIFF(millisecond, dtl.start_time, dtl.end_time) as duration,
DATEDIFF(millisecond, dtl.delay_start_time, dtl.end_time) as duration_with_delay,
dtl.node_sequence
from uc_cycle_test_execution as test
join uc_cycle_execution_results as dtl
on test.execution_id = dtl.execution_id
and node_type not in ('Group','GroupTest','ConditionalBlock','ConditionalExpression')
left join (select execution_id, node_id, parent_node_id, sending_node_id, worker_name from uc_cycle_execution_results where node_type = 'Feature') as worker
on dtl.execution_id = worker.execution_id
and dtl.sending_node_id = worker.node_id
left join (select execution_id, node_id, name, data_file_path from uc_cycle_execution_results where node_type = 'Group') as cyc_group
on worker.execution_id = cyc_group.execution_id
and worker.parent_node_id = cyc_group.node_id;
MOCA SqlServer for Cycle version 2.3.0 (Run second)
CREATE TABLE uc_cycle_image (
id nvarchar(100) NOT NULL,
image varbinary(MAX),
CONSTRAINT PK_CYCLE_IMAGE PRIMARY KEY (id)
) ;
CREATE TABLE uc_cycle_image_results (
id nvarchar(100) NOT NULL,
execution_id nvarchar(100) NOT NULL,
node_id nvarchar(255) NOT NULL,
template_file TEXT,
template_image_id nvarchar(100) DEFAULT NULL,
screenshot_image_id nvarchar(100) DEFAULT NULL,
found_image BIT DEFAULT NULL,
min_value FLOAT DEFAULT NULL,
max_value FLOAT DEFAULT NULL,
min_location_x int DEFAULT NULL,
min_location_y int DEFAULT NULL,
max_location_x int DEFAULT NULL,
max_location_y int DEFAULT NULL,
source_width int DEFAULT NULL,
source_height int DEFAULT NULL,
template_width int DEFAULT NULL,
template_height int DEFAULT NULL,
correlation_threshold FLOAT DEFAULT NULL,
CONSTRAINT PK_CYCLE_IMAGE_RESULTS PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_IMAGE_RESULTS FOREIGN KEY (execution_id, node_id) REFERENCES uc_cycle_execution_results(execution_id,node_id) ,
CONSTRAINT FK_CYCLE_TERMINAL_T FOREIGN KEY (template_image_id) REFERENCES uc_cycle_image(id) ,
CONSTRAINT FK_CYCLE_TERMINAL_S FOREIGN KEY (screenshot_image_id) REFERENCES uc_cycle_image(id)
) ;
CREATE TABLE uc_cycle_terminal_screens (
id nvarchar(100) NOT NULL,
execution_id nvarchar(100) NOT NULL,
node_id nvarchar(255) NOT NULL,
screen TEXT,
CONSTRAINT PK_CYCLE_TERMINAL PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_TERMINAL FOREIGN KEY (execution_id,node_id) REFERENCES uc_cycle_execution_results(execution_id,node_id)
) ;
CREATE TABLE uc_cycle_file_diagnostics (
id nvarchar(100) NOT NULL,
execution_id nvarchar(100) NOT NULL,
node_id nvarchar(255) NOT NULL,
start_line int,
start_character int,
end_line int,
end_character int,
message TEXT,
severity nvarchar(100),
code int,
source TEXT,
CONSTRAINT PK_FILE_DIAGNOSTICS PRIMARY KEY (id) ,
CONSTRAINT FK_FILE_DIAGNOSTICS FOREIGN KEY (execution_id,node_id) REFERENCES uc_cycle_execution_results(execution_id,node_id)
) ;
MOCA SqlServer for Cycle version 2.5.0 (Run third)
CREATE TABLE uc_data_type_lookup (
id int NOT NULL ,
datatype_desc nvarchar(100) NOT NULL ,
CONSTRAINT uc_data_type_lookup_PK PRIMARY KEY (id)
) ;
insert into uc_data_type_lookup values (1, 'STRING');
insert into uc_data_type_lookup values (2, 'INT');
insert into uc_data_type_lookup values (3, 'FLOAT');
CREATE TABLE uc_test_plan (
id nvarchar(100) NOT NULL ,
name nvarchar(255) NOT NULL ,
is_default BIT ,
description TEXT ,
CONSTRAINT uc_test_plan_PK PRIMARY KEY (id)
) ;
CREATE TABLE uc_test_data_tag (
id nvarchar(100) NOT NULL ,
name nvarchar(255) NOT NULL ,
CONSTRAINT uc_test_data_tag_PK PRIMARY KEY (id)
) ;
CREATE TABLE uc_test_data_set (
id nvarchar(100) NOT NULL ,
test_plan_id nvarchar(100) NOT NULL ,
name nvarchar(255) NOT NULL ,
description TEXT ,
CONSTRAINT uc_test_data_set_PK PRIMARY KEY (id) ,
CONSTRAINT uc_test_data_set_FK FOREIGN KEY (test_plan_id) REFERENCES uc_test_plan(id)
) ;
CREATE UNIQUE INDEX uc_test_data_set_UN ON uc_test_data_set (test_plan_id,name);
CREATE TABLE uc_test_data_column (
id nvarchar(100) NOT NULL ,
test_data_set_id nvarchar(100) NOT NULL ,
name nvarchar(255) NOT NULL ,
datatype int NOT NULL ,
sort_sequence int NOT NULL ,
CONSTRAINT uc_test_data_column_PK PRIMARY KEY (id) ,
CONSTRAINT uc_test_data_column_FK FOREIGN KEY (test_data_set_id) REFERENCES uc_test_data_set(id) ,
CONSTRAINT uc_test_data_type_FK FOREIGN KEY (datatype) REFERENCES uc_data_type_lookup(id)
) ;
CREATE TABLE uc_test_data_record (
id nvarchar(100) NOT NULL ,
test_data_set_id nvarchar(100) NOT NULL ,
sort_sequence int NOT NULL ,
CONSTRAINT uc_test_data_record_PK PRIMARY KEY (id) ,
CONSTRAINT uc_test_data_record_FK FOREIGN KEY (test_data_set_id) REFERENCES uc_test_data_set(id)
) ;
CREATE TABLE uc_test_data_record_tag (
id nvarchar(100) NOT NULL ,
test_data_tag_id nvarchar(100) NOT NULL ,
test_data_record_id nvarchar(100) NOT NULL ,
CONSTRAINT uc_test_data_record_tag_PK PRIMARY KEY (id) ,
CONSTRAINT uc_test_data_tag_FK FOREIGN KEY (test_data_tag_id) REFERENCES uc_test_data_tag(id) ,
CONSTRAINT uc_test_data_record_tag_FK FOREIGN KEY (test_data_record_id) REFERENCES uc_test_data_record(id)
) ;
CREATE TABLE uc_test_data_value (
id nvarchar(100) NOT NULL ,
test_data_record_id nvarchar(100) NOT NULL ,
test_data_column_id nvarchar(100) NOT NULL ,
data_value TEXT ,
CONSTRAINT uc_test_data_value_PK PRIMARY KEY (id) ,
CONSTRAINT uc_test_data_record_val_FK FOREIGN KEY (test_data_record_id) REFERENCES uc_test_data_record(id) ,
CONSTRAINT uc_test_data_column_val_FK FOREIGN KEY (test_data_column_id) REFERENCES uc_test_data_column(id)
) ;
MOCA SqlServer for Cycle version: 2.7.0 (Run fourth)
ALTER TABLE uc_test_data_tag
ADD CONSTRAINT uc_test_data_tag_UC UNIQUE (name);
ALTER TABLE uc_test_data_column
ADD CONSTRAINT uc_test_data_column_UC UNIQUE (test_data_set_id,name);
MOCA Oracle for Cycle version 2.2.0 (Run first)
CREATE TABLE uc_cycle_test_execution (
execution_id VARCHAR2(100) NOT NULL,
execution_start_ts timestamp(6) NOT NULL,
cycle_user VARCHAR2(100) NOT NULL,
cycle_version VARCHAR2(100) NOT NULL,
hardware_id VARCHAR2(100) NOT NULL,
computer_username VARCHAR2(100) NOT NULL,
os VARCHAR2(100) NOT NULL,
invoker VARCHAR2(100) NOT NULL,
CONSTRAINT PK_test_execution PRIMARY KEY (execution_id)
) ;
CREATE TABLE uc_cycle_execution_results (
execution_id VARCHAR2(100) NOT NULL,
node_id VARCHAR2(255) NOT NULL,
parent_node_id VARCHAR2(255) DEFAULT NULL,
sending_node_id VARCHAR2(255) NOT NULL,
node_sequence int NOT NULL,
node_type VARCHAR2(100) NOT NULL,
block_type VARCHAR2(100) DEFAULT NULL,
name VARCHAR2(4000) DEFAULT NULL,
status VARCHAR2(100) NOT NULL,
message VARCHAR2(4000) DEFAULT NULL,
error_message VARCHAR2(4000) DEFAULT NULL,
file_uri VARCHAR2(4000) DEFAULT NULL,
start_line int DEFAULT NULL,
end_line int DEFAULT NULL,
data_file_path VARCHAR2(4000) DEFAULT NULL,
worker_name VARCHAR2(4000) DEFAULT NULL,
tags VARCHAR2(4000) DEFAULT NULL,
step_id VARCHAR2(100) DEFAULT NULL,
delay_start_time timestamp(6) DEFAULT NULL,
start_time timestamp(6) NOT NULL,
end_time timestamp(6) DEFAULT NULL,
CONSTRAINT PK_cycle_execution_results PRIMARY KEY (execution_id,node_id),
CONSTRAINT FK_cycle_execution_results FOREIGN KEY (execution_id) REFERENCES uc_cycle_test_execution (execution_id)
) ;
CREATE INDEX cycle_node_type_IDX ON uc_cycle_execution_results (node_type);;
CREATE INDEX cycle_parent_node_IDX ON uc_cycle_execution_results (execution_id,parent_node_id);;
CREATE INDEX cycle_sending_node_IDX ON uc_cycle_execution_results (execution_id,sending_node_id);;
CREATE VIEW uc_cycle_execution_view AS
SELECT test.execution_id,
test.cycle_user,
test.os,
test.computer_username,
test.hardware_id,
test.cycle_version,
cyc_group.name as group_name,
cyc_group.data_file_path,
worker.worker_name,
dtl.node_id,
dtl.node_type,
dtl.name,
dtl.block_type,
dtl.tags,
dtl.status,
dtl.message,
dtl.error_message,
dtl.file_uri,
dtl.start_line,
dtl.end_line,
dtl.delay_start_time,
dtl.start_time,
dtl.end_time,
(sysdate + (dtl.end_time - dtl.start_time) * 1000 - sysdate) * 86400 as duration,
(sysdate + (dtl.end_time - dtl.delay_start_time) * 1000 - sysdate) * 86400 as duration_with_delay,
dtl.node_sequence
from uc_cycle_test_execution test
join uc_cycle_execution_results dtl
on test.execution_id = dtl.execution_id
and node_type not in ('Group','GroupTest','ConditionalBlock','ConditionalExpression')
left join (select execution_id, node_id, parent_node_id, sending_node_id, worker_name from uc_cycle_execution_results where node_type = 'Feature') worker
on dtl.execution_id = worker.execution_id
and dtl.sending_node_id = worker.node_id
left join (select execution_id, node_id, name, data_file_path from uc_cycle_execution_results where node_type = 'Group') cyc_group
on worker.execution_id = cyc_group.execution_id
and worker.parent_node_id = cyc_group.node_id;
MOCA Oracle for Cycle version 2.3.0 (Run second)
CREATE TABLE uc_cycle_image (
id VARCHAR2(100) NOT NULL,
image BLOB,
CONSTRAINT PK_CYCLE_IMAGE PRIMARY KEY (id)
) ;
CREATE TABLE uc_cycle_image_results (
id VARCHAR2(100) NOT NULL,
execution_id VARCHAR2(100) NOT NULL,
node_id VARCHAR2(255) NOT NULL,
template_file VARCHAR2(4000),
template_image_id VARCHAR2(100) DEFAULT NULL,
screenshot_image_id VARCHAR2(100) DEFAULT NULL,
found_image CHAR(1) DEFAULT NULL,
min_value BINARY_DOUBLE DEFAULT NULL,
max_value BINARY_DOUBLE DEFAULT NULL,
min_location_x int DEFAULT NULL,
min_location_y int DEFAULT NULL,
max_location_x int DEFAULT NULL,
max_location_y int DEFAULT NULL,
source_width int DEFAULT NULL,
source_height int DEFAULT NULL,
template_width int DEFAULT NULL,
template_height int DEFAULT NULL,
correlation_threshold BINARY_DOUBLE DEFAULT NULL,
CONSTRAINT PK_CYCLE_IMAGE_RESULTS PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_IMAGE_RESULTS FOREIGN KEY (execution_id, node_id) REFERENCES uc_cycle_execution_results (execution_id,node_id) ,
CONSTRAINT FK_CYCLE_TERMINAL_T FOREIGN KEY (template_image_id) REFERENCES uc_cycle_image (id) ,
CONSTRAINT FK_CYCLE_TERMINAL_S FOREIGN KEY (screenshot_image_id) REFERENCES uc_cycle_image (id)
) ;
CREATE TABLE uc_cycle_terminal_screens (
id VARCHAR2(100) NOT NULL,
execution_id VARCHAR2(100) NOT NULL,
node_id VARCHAR2(255) NOT NULL,
screen VARCHAR2(4000),
CONSTRAINT PK_CYCLE_TERMINAL PRIMARY KEY (id) ,
CONSTRAINT FK_CYCLE_TERMINAL FOREIGN KEY (execution_id,node_id) REFERENCES uc_cycle_execution_results (execution_id,node_id)
) ;
CREATE TABLE uc_cycle_file_diagnostics (
id VARCHAR2(100) NOT NULL,
execution_id VARCHAR2(100) NOT NULL,
node_id VARCHAR2(255) NOT NULL,
start_line int,
start_character int,
end_line int,
end_character int,
message VARCHAR2(4000),
severity VARCHAR2(100),
code int,
source VARCHAR2(4000),
CONSTRAINT PK_FILE_DIAGNOSTICS PRIMARY KEY (id) ,
CONSTRAINT FK_FILE_DIAGNOSTICS FOREIGN KEY (execution_id,node_id) REFERENCES uc_cycle_execution_results (execution_id,node_id)
) ;
MOCA Oracle for Cycle version 2.5.0 (Run third)
CREATE TABLE uc_data_type_lookup (
id int NOT NULL ,
datatype_desc VARCHAR2(100) NOT NULL ,
CONSTRAINT uc_data_type_lookup_PK PRIMARY KEY (id)
) ;
insert into uc_data_type_lookup values (1, 'STRING');
insert into uc_data_type_lookup values (2, 'INT');
insert into uc_data_type_lookup values (3, 'FLOAT');
CREATE TABLE uc_test_plan (
id VARCHAR2(100) NOT NULL ,
name VARCHAR2(255) NOT NULL ,
is_default CHAR(1) ,
description VARCHAR2(4000) ,
CONSTRAINT uc_test_plan_PK PRIMARY KEY (id)
) ;
CREATE TABLE uc_test_data_tag (
id VARCHAR2(100) NOT NULL ,
name VARCHAR2(255) NOT NULL ,
CONSTRAINT uc_test_data_tag_PK PRIMARY KEY (id)
) ;
CREATE TABLE uc_test_data_set (
id VARCHAR2(100) NOT NULL ,
test_plan_id VARCHAR2(100) NOT NULL ,
name VARCHAR2(255) NOT NULL ,
description VARCHAR2(4000) ,
CONSTRAINT uc_test_data_set_PK PRIMARY KEY (id) ,
CONSTRAINT uc_test_data_set_FK FOREIGN KEY (test_plan_id) REFERENCES uc_test_plan (id)
) ;
CREATE UNIQUE INDEX uc_test_data_set_UN ON uc_test_data_set (test_plan_id,name);
CREATE TABLE uc_test_data_column (
id VARCHAR2(100) NOT NULL ,
test_data_set_id VARCHAR2(100) NOT NULL ,
name VARCHAR2(255) NOT NULL ,
datatype int NOT NULL ,
sort_sequence int NOT NULL ,
CONSTRAINT uc_test_data_column_PK PRIMARY KEY (id) ,
CONSTRAINT uc_test_data_column_FK FOREIGN KEY (test_data_set_id) REFERENCES uc_test_data_set (id) ,
CONSTRAINT uc_test_data_type_FK FOREIGN KEY (datatype) REFERENCES uc_data_type_lookup (id)
) ;
CREATE TABLE uc_test_data_record (
id VARCHAR2(100) NOT NULL ,
test_data_set_id VARCHAR2(100) NOT NULL ,
sort_sequence int NOT NULL ,
CONSTRAINT uc_test_data_record_PK PRIMARY KEY (id) ,
CONSTRAINT uc_test_data_record_FK FOREIGN KEY (test_data_set_id) REFERENCES uc_test_data_set (id)
) ;
CREATE TABLE uc_test_data_record_tag (
id VARCHAR2(100) NOT NULL ,
test_data_tag_id VARCHAR2(100) NOT NULL ,
test_data_record_id VARCHAR2(100) NOT NULL ,
CONSTRAINT uc_test_data_record_tag_PK PRIMARY KEY (id) ,
CONSTRAINT uc_test_data_tag_FK FOREIGN KEY (test_data_tag_id) REFERENCES uc_test_data_tag (id) ,
CONSTRAINT uc_test_data_record_tag_FK FOREIGN KEY (test_data_record_id) REFERENCES uc_test_data_record (id)
) ;
CREATE TABLE uc_test_data_value (
id VARCHAR2(100) NOT NULL ,
test_data_record_id VARCHAR2(100) NOT NULL ,
test_data_column_id VARCHAR2(100) NOT NULL ,
data_value VARCHAR2(4000) ,
CONSTRAINT uc_test_data_value_PK PRIMARY KEY (id) ,
CONSTRAINT uc_test_data_record_val_FK FOREIGN KEY (test_data_record_id) REFERENCES uc_test_data_record (id) ,
CONSTRAINT uc_test_data_column_val_FK FOREIGN KEY (test_data_column_id) REFERENCES uc_test_data_column (id)
) ;
MOCA Oracle for Cycle version: 2.7.0 (Run fourth)
ALTER TABLE uc_test_data_tag
ADD CONSTRAINT uc_test_data_tag_UC UNIQUE (name);
ALTER TABLE uc_test_data_column
ADD CONSTRAINT uc_test_data_column_UC UNIQUE (test_data_set_id,name);