Giter Club home page Giter Club logo

popt's Introduction

popt

PoPT - Power of Plain Text is a tool for generating plain text human-readable log files from Robotframework output.xml files.

$ popt output.xml
========================================================================================================================
generated: 20160105 13:37:33.973
generator: Robot 3.0 (Python 2.7.6 on linux2)
========================================================================================================================
  Source Of Test Xml                                                                          FAIL  13:37:33.974  00.610
    Suite setup                                                                               PASS  13:37:34.030  00.000
      BuiltIn.Log                                                                             PASS  13:37:34.030  00.000
          arg: We are doing some strange setup actions here!
        13:37:34.030  INFO   We are doing some strange setup actions here!
------------------------------------------------------------------------------------------------------------------------
    Test 1                                                                                    PASS  13:37:34.031  00.200
      Write a long log                                                                        PASS  13:37:34.031  00.100
        BuiltIn.Log                                                                           PASS  13:37:34.031  00.000
            arg: ${VERY LONG TEXT}
          13:37:34.031  INFO   The Zen of Python, by Tim Peters
                               
                               Beautiful is better than ugly.
                               Explicit is better than implicit.
                               Simple is better than complex.
                               Complex is better than complicated.
                               Flat is better than nested.
                               Sparse is better than dense.
                               Readability counts.
                               Special cases aren't special enough to break the rules.
                               Although practicality beats purity.
                               Errors should never pass silently.
                               Unless explicitly silenced.
                               In the face of ambiguity, refuse the temptation to guess.
                               There should be one-- and preferably only one --obvious way to do it.
                               Although that way may not be obvious at first unless you're Dutch.
                               Now is better than never.
                               Although never is often better than *right* now.
                               If the implementation is hard to explain, it's a bad idea.
                               If the implementation is easy to explain, it may be a good idea.
                               Namespaces are one honking great idea -- let's do more of those!

      Test 1 keyword 2                                                                        PASS  13:37:34.032  00.100
        BuiltIn.Log                                                                           PASS  13:37:34.032  00.000
            arg: Test 1 keyword 2
          13:37:34.032  INFO   Test 1 keyword 2
        Test 1 inner keyword                                                                  PASS  13:37:34.032  00.100
          BuiltIn.Log                                                                         PASS  13:37:34.032  00.100
              arg: Test 1 inner keyword
            13:37:34.032  INFO   Test 1 inner keyword
        tag: Feature1
        tag: Feature2
------------------------------------------------------------------------------------------------------------------------
    Test 2                                                                                    FAIL  13:37:34.033  00.200
      Test 2 keyword 1                                                                        PASS  13:37:34.033  00.100
          arg: foo
          arg: bar
          arg: dii
          arg: daa
        assign {} 
          var {} ${foo}
        BuiltIn.Log                                                                           PASS  13:37:34.034  00.000
            arg: Test 2 keyword 1
          13:37:34.034  INFO   Test 2 keyword 1
        13:37:34.034  INFO   ${foo} = foo
      BuiltIn.Should Be Equal                                                                 FAIL  13:37:34.034  00.000
          arg: ${foo}
          arg: bar
        13:37:34.034  FAIL   foo != bar
    metadata {} 
      item {'name': 'Version'} 0.1
  errors {} 
========================================================================================================================

The following is useful in travis CI or similar to find out where your robot tests are failing. If you use "Log Source" you be able to view the source in the output.

"grep  --include=output.xml -Rl  FAIL . | xargs --no-run-if-empty -n 1 python2.7 popt"

popt's People

Contributors

jkohvakk avatar djay avatar

Stargazers

Jabir Ali V avatar  avatar  avatar  avatar Tset Noitamotua avatar

Watchers

James Cloos avatar  avatar

popt's Issues

Can't install `popt`

Installation fails:

# pip install popt
Collecting popt
  Downloading popt-0.4.tar.gz (5.9 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bi5o64w1/popt_f91b956093da4e9a9b01558dbc5b4278/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bi5o64w1/popt_f91b956093da4e9a9b01558dbc5b4278/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-3_099g_i
         cwd: /tmp/pip-install-bi5o64w1/popt_f91b956093da4e9a9b01558dbc5b4278/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-bi5o64w1/popt_f91b956093da4e9a9b01558dbc5b4278/setup.py", line 16, in <module>
        read("CHANGES.md"),),
      File "/tmp/pip-install-bi5o64w1/popt_f91b956093da4e9a9b01558dbc5b4278/setup.py", line 7, in read
        with open(os.path.join(os.path.dirname(__file__), *rnames)) as f:
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-bi5o64w1/popt_f91b956093da4e9a9b01558dbc5b4278/CHANGES.md'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

The issue is that setup.py tries to read CHANGE.md, but that file is not packaged:

$ curl -LO https://files.pythonhosted.org/packages/fe/36/73d0bb3a14bb98aa5893e73c810f5912d3e2a9e5851b950e5baada850f8f/popt-0.4.tar.gz
$ tar xf popt-0.4.tar.gz
$ tree
.
├── popt-0.4
│  ├── PKG-INFO
│  ├── popt
│  │  ├── __init__.py
│  │  └── popt.py
│  ├── popt.egg-info
│  │  ├── dependency_links.txt
│  │  ├── entry_points.txt
│  │  ├── PKG-INFO
│  │  ├── requires.txt
│  │  ├── SOURCES.txt
│  │  └── top_level.txt
│  ├── README.md
│  ├── setup.cfg
│  ├── setup.py
│  └── test
│     └── test_popt.py
└── popt-0.4.tar.gz

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.