tcms.testruns.models module

class tcms.testruns.models.TestCaseRun(case_run_id, assignee, tested_by, case_text_version, running_date, close_date, notes, sortkey, run, case, case_run_status, build)[source]

Bases: tcms.core.models.TCMSActionModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

add_bug(bug_id, bug_system_id, summary=None, description=None, bz_external_track=False)[source]
assignee

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

assignee_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

build

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

build_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

case_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case_run_bug

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

case_run_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case_run_status

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

case_run_status_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case_text_version

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

close_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_bugs()[source]
get_bugs_count()[source]
get_text_versions()[source]
get_text_with_version(case_text_version=None)[source]
history = <simple_history.manager.HistoryManager object>
latest_text()[source]
linkreference_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

Returns all links attached to this object!

notes

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
remove_bug(bug_id, run_id=None)[source]
run

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

run_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

running_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

sortkey

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

tested_by

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

tested_by_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

classmethod to_xmlrpc(query: dict = None)[source]

Convert the query set for XMLRPC

class tcms.testruns.models.TestCaseRunStatus(id, name)[source]

Bases: tcms.core.models.TCMSActionModel

BLOCKED = 'BLOCKED'
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

FAILED = 'FAILED'
IDLE = 'IDLE'
exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

PASSED = 'PASSED'
complete_status_names = ('PASSED', 'ERROR', 'FAILED', 'WAIVED')
failure_status_names = ('ERROR', 'FAILED')
classmethod get_names()[source]

Get all status names in mapping between id and name

classmethod get_names_ids()[source]

Get all status names in reverse mapping between name and id

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

idle_status_names = ('IDLE',)
name
objects = <django.db.models.manager.Manager object>
testcaserun_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

untranslated(fieldname)
class tcms.testruns.models.TestCaseRunStatusSubtotal(StatusSubtotal, CaseRunsTotalCount, CompletedPercentage, FailurePercentage, SuccessPercentage)

Bases: tuple

CaseRunsTotalCount

Alias for field number 1

CompletedPercentage

Alias for field number 2

FailurePercentage

Alias for field number 3

StatusSubtotal

Alias for field number 0

SuccessPercentage

Alias for field number 4

class tcms.testruns.models.TestRun(run_id, product_version, start_date, stop_date, summary, notes, plan, build, manager, default_tester)[source]

Bases: tcms.core.models.TCMSActionModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

add_case_run(case, case_run_status=1, assignee=None, case_text_version=None, build=None, notes=None, sortkey=0)[source]
add_cc(user)[source]
add_tag(tag)[source]
build

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

build_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

case_run

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

cc

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

cc_list

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

completed_case_run_percent
default_tester

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

default_tester_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_bug_count()[source]

Return the count of distinct bug numbers recorded for this particular TestRun.

get_next_by_start_date(*, field=<django.db.models.fields.DateTimeField: start_date>, is_next=True, **kwargs)
get_notify_addrs()[source]

Get the all related mails from the run

get_percentage(count)[source]
get_previous_by_start_date(*, field=<django.db.models.fields.DateTimeField: start_date>, is_next=False, **kwargs)
history = <simple_history.manager.HistoryManager object>
manager

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

manager_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

notes

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
plan

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

plan_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

product_version

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

product_version_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

remove_cc(user)[source]
remove_tag(tag)[source]
run_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

start_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stats_caseruns_status(case_run_statuses=None)[source]

Get statistics based on case runs’ status

@param case_run_statuss: iterable object containing TestCaseRunStatus
objects representing PASS, FAIL, WAIVED, etc.

@type case_run_statuses: iterable object @return: the statistics including the number of each status mapping,

total number of case runs, complete percent, and failure percent.

@rtype: namedtuple

stop_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

summary

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

tag

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

tags

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

classmethod to_xmlrpc(query=None)[source]

Convert the query set for XMLRPC

total_num_caseruns
update_completion_status(is_finished)[source]
class tcms.testruns.models.TestRunCC(id, run, user)[source]

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
run

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

run_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class tcms.testruns.models.TestRunTag(id, tag, run)[source]

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
run

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

run_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

tag

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

tag_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.