Menu

#81 report input field

open
nobody
Reporting (6)
5
2009-08-11
2009-08-11
Anonymous
No

The fields stepnumber, action, expected result ... is written to verifyresults table. But the field inputs is only written to teststep. I would wish that the inputfield was written to verifyresult table too for simplifying reporting.

I made a workaround like this:

Change Custom_6 to text and allow NULL:
ALTER TABLE `verifyresults` CHANGE `Custom_6` `Custom_6` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL

Results_run_manual_test_action.php
# PREPARE TO WRITE TO VERIFY_RESULTS TABLE
$vr_tbl = VERIFY_RESULTS_TBL;
$f_run_id = VERIFY_RESULTS_TS_UNIQUE_RUN_ID;
$f_timestamp = VERIFY_RESULTS_LOG_TIME_STAMP;
$f_stepno = VERIFY_RESULTS_VAL_ID;
$f_action = VERIFY_RESULTS_ACTION;
$f_expected = VERIFY_RESULTS_EXPECTED_RESULT;
$f_actual = VERIFY_RESULTS_ACTUAL_RESULT;
$f_status = VERIFY_RESULTS_TEST_STATUS;
$f_inputs = VERIFY_RESULTS_SHOW_CUSTOM_6;

# WRITE EACH RECORD TO VERIFY_RESULTS
foreach(test_get_test_steps( $test_id ) as $row_test_step) {

$row_test_step_id = $row_test_step[TEST_STEP_ID];
$stepno = $row_test_step[TEST_STEP_NO];
$step_action = $row_test_step[TEST_STEP_ACTION];
$step_expected = $row_test_step[TEST_STEP_EXPECTED];
$inputs = $row_test_step[TEST_STEP_TEST_INPUTS]; //defined to field custom_6
$actual_result = session_validate_form_get_field("actual_result_$row_test_step_id");
$step_status = session_validate_form_get_field( "step_status_$row_test_step_id" );

$q = "INSERT INTO $vr_tbl
($f_run_id, $f_timestamp, $f_stepno, $f_action, $f_expected, $f_actual, $f_status,$f_inputs )
VALUES ( '$test_run_id',
'$time_finished',
'$stepno',
'$step_action',
'$step_expected',
'$actual_result',
'$step_status',
'$inputs' )";

// $inputs writes til custom_6

#print"$q <BR>";
db_query( $db, $q );
#print"$q <BR>";
db_query( $db, $q );

Discussion


Log in to post a comment.