Giter VIP home page Giter VIP logo

agent-python-robotframework's Introduction

ReportPortal RobotFramework agent

Build Status PyPI

Listener for RobotFramework to report results to ReportPortal

Installation

First you need to install RobotFramework:

pip install robotframework

The latest stable version of library is available on PyPI:

pip install robotframework-reportportal

reportportal-client will be installed as a dependency

Usage

For reporting results to ReportPortal you need to pass some variables to pybot run:

REQUIRED:

--listener robotframework_reportportal.listener
--variable RP_UUID:"your_user_uuid"
--variable RP_ENDPOINT:"your_reportportal_url"
--variable RP_LAUNCH:"launch_name"
--variable RP_PROJECT:"reportportal_project_name"

NOT REQUIRED:

--variable RP_LAUNCH_DOC:"some_documentation_for_launch"
    - Description for the launch
--variable RP_LAUNCH_TAGS:"RF Smoke"
    - Space-separated list of tags for the launch
--variable RP_LOG_BATCH_SIZE:"10"
    - Default value is "20", affects size of async batch log requests

Custom logger which supports attachments can be used in Python keywords. Usage of this logger is similar to the standard robot.api.logger with addition of an extra kwarg "attachment":

import subprocess
from robotframework_reportportal import logger

class MyLibrary(object):

    def log_free_memory(self):
        logger.debug("Collecting free memory statistics!")
        logger.debug(
            "Memory consumption report",
            attachment={
                "name": "free_memory.txt",
                "data": subprocess.check_output("free -h".split()),
                "mime": "application/octet-stream",
            },
        )

Copyright Notice

Licensed under the GPLv3 license (see the LICENSE.txt file).

agent-python-robotframework's People

Contributors

avarabyeu avatar flyaroundme avatar frizzby avatar scorpibear avatar tkachoff avatar vakulich avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.