forked from robotframework/robotframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
79 lines (62 loc) · 3.51 KB
/
__init__.py
File metadata and controls
79 lines (62 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
""":mod:`robot.api` package exposes the public APIs of Robot Framework.
Unless stated otherwise, the APIs exposed in this package are considered
stable, and thus safe to use when building external tools on top of
Robot Framework. Notice that all parsing APIs were rewritten in Robot
Framework 3.2.
Currently exposed APIs are:
* :mod:`.logger` module for libraries' logging purposes.
* :mod:`.deco` module with decorators libraries can utilize.
* :mod:`.exceptions` module containing exceptions that libraries can utilize for
reporting failures and other events. These exceptions can be imported also directly
via :mod:`robot.api` like ``from robot.api import SkipExecution``.
* :mod:`.parsing` module exposing the parsing APIs. This module is new in Robot
Framework 4.0. Various parsing related functions and classes were exposed
directly via :mod:`robot.api` already in Robot Framework 3.2, but they are
effectively deprecated and will be removed in the future.
* :class:`~robot.running.model.TestSuite` class for creating executable
test suites programmatically and
:class:`~robot.running.builder.builders.TestSuiteBuilder` class
for creating such suites based on existing test data on the file system.
* :class:`~robot.model.visitor.SuiteVisitor` abstract class for processing testdata
before execution. This can be used as a base for implementing a pre-run
modifier that is taken into use with ``--prerunmodifier`` commandline option.
* :func:`~robot.result.resultbuilder.ExecutionResult` factory method
for reading execution results from XML output files and
:class:`~robot.result.visitor.ResultVisitor` abstract class to ease
further processing the results.
:class:`~robot.result.visitor.ResultVisitor` can also be used as a base
for pre-Rebot modifier that is taken into use with ``--prerebotmodifier``
commandline option.
* :class:`~robot.reporting.resultwriter.ResultWriter` class for writing
reports, logs, XML outputs, and XUnit files. Can write results based on
XML outputs on the file system, as well as based on the result objects
returned by the :func:`~robot.result.resultbuilder.ExecutionResult` or
an executed :class:`~robot.running.model.TestSuite`.
All of the above names can be imported like::
from robot.api import ApiName
See documentations of the individual APIs for more details.
.. tip:: APIs related to the command line entry points are exposed directly
via the :mod:`robot` root package.
"""
from robot.model import SuiteVisitor
from robot.parsing import (get_tokens, get_resource_tokens, get_init_tokens,
get_model, get_resource_model, get_init_model,
Token)
from robot.reporting import ResultWriter
from robot.result import ExecutionResult, ResultVisitor
from robot.running import TestSuite, TestSuiteBuilder
from .exceptions import ContinuableFailure, Failure, FatalError, Error, SkipExecution