NAME
Tapper::Cmd::Testplan
SYNOPSIS
This project offers functions to add, delete or update testplan instances in the database.
use Tapper::Cmd::Testplan;
my $cmd = Tapper::Cmd::Testplan->new();
my $plan_id = $cmd->add($plan);
$cmd->update($plan_id, $new_plan);
$cmd->del($plan_id);
...
NAME
Tapper::Cmd::Testplan - Backend functions for manipluation of testplan instances in the database
FUNCTIONS
get_module_for_type
Get the name of the Tapper::Cmd module that is reponsible for a given type. The name of the module is optimized for the Tapper developer but the type given in the testplan should be telling for the testplan user.
@param string - type
@return string - name of the responsible module
add
Add a new testplan instance to database and create the associated testruns. The function expects a string containing the evaluated test plan content and a path.
@param string - plan content @param string - path @optparam string - name
@return int - testplan instance id
@throws die()
del
Delete testrun with given id from database. Please not that this does not remove the associated testruns.
@param int - testplan instance id
@return success - 0 @return error - exception
@throws die()
rerun
Reapply the evaluated testplan of the given testplan instance.
@param int - testplan instance id
@return success - new testplan id @return error - exception
@throws die()
parse_path
Get the test plan path from the filename. This is a little more tricky since we do not simply want the dirname but kind of an "un-prefix".
@param string - file name
@return string - test plan path
guide
Get self documentation of a testplan file.
@param string - file name of testplan file
@return success - documentation text
@throws - die()
testplannew
Create a testplan instance from a file.
@param hash ref - options containing
required: * file: string, path of the testplan file * substitutes: hash ref, substitute variables for Template Toolkit
optional: * include: array ref of strings containing include paths * path: string, alternative path instead of real path * name: string, overwrite shortname in plan
@return success - testplan id
@throws die
status
Get information of one testplan.
@param int - testplan id
@return - hash ref - * count_fail 0, * count_pass 2, * count_pending 0, * name "HWXYZ", * path undef, * testplan_date "2014-03-24", * testplan_id 1040, * testplan_time "14:17"
@throws - die
testplan_files
Get all files that belong to a testplan.
@param int - testplan id @param string - filter
@return array ref - list of report file ids
@throws - die
AUTHORS
AMD OSRC Tapper Team <tapper@amd64.org>
Tapper Team <tapper-ops@amazon.com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2016 by Advanced Micro Devices, Inc..
This is free software, licensed under:
The (two-clause) FreeBSD License