Giter Site home page Giter Site logo

kinow / gtest-tap-listener Goto Github PK

View Code? Open in Web Editor NEW
74.0 13.0 24.0 46 KB

GoogleTest TAP Listener

Home Page: https://tupilabs.com/tap4j/

License: MIT License

C++ 76.69% CMake 23.31%
tap testanythingprotocol testing googletest gtest cpp hacktoberfest

gtest-tap-listener's Introduction

GTest TAP Listener

CI

Overview

This is a small contribution to Google Test. Oliver and I were working on an issue in Jenkins plug-in when he told me about Google Test. As this plug-in relies heavily on TAP, we talked about how it looked like a good idea have TAP in GoogleTest.

Although GoogleTest has an XML writer, it lacks a TAP one. Using its Event Listeners model it was quite easy to implement this first version of this TAP listener.

See the examples directory for code to be used as reference.

Write to stdout

By default, the GoogleTest TAP Listener emits TAP to files with names that match the test names. If you prefer to have the output written to stdout, use the definition GTEST_TAP_PRINT_TO_STDOUT when compiling your project.

Changelog

See CHANGES.md.

Contributions

Feel free to send contributions, pull requests, suggestions or any other feedback to the project.

See CONTRIBUTING.md.

Authors

A list of contributors to this repository can be found in CONTRIBUTORS.txt.

Links

License

Licensed under MIT. See LICENSE.txt.

gtest-tap-listener's People

Contributors

kinow avatar loverszhaokai avatar pitti avatar samxamnom avatar smspillaz avatar toch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gtest-tap-listener's Issues

prefix for .tap filename

Hi,
Could you please add:

  • configurable prefix for filename generated by tap.h
  • Location where to store .tap files?

The use-case is as following:

  • we run gtest 2-3 time:
  • w/ valgringd
  • w/ code coverage
  • just gtest

Every execution overrides .tap files created on previous step.

The proposal:

% GTEST_TAP_FILENAME_PREFIX="gtest_vg_" valgrind gtest
% GTEST_TAP_FILENAME_PREFIX="gtest_codecov_" codecov gtest
% GTEST_TAP_DIR=/tmp/taps gtest

Thanks

Write to stdout rather that a file on disk

From a quick look through the implementation, it appears that it writes to files on disk rather than stdout. Is that understanding correct?

TAP expects output to be written to standard output:
http://testanything.org/tap-version-14-specification.html

(for example, the "Bail out!" section talks specifically about writing to standard output)

Does GoogleTest have an option for not writing its own output to standard output, so that the TAP listener could write there instead, per the TAP spec?

Write to TAP stream during execution

From a quick look at the code, it appears that tap.h currently holds all results until the test run completes, and then writes to output then. Is that understanding correct?

If so, I believe that conflicts with how TAP is designed to work, as a stream, with results written while tests are running:
http://testanything.org/philosophy.html

Can the implementation be changed to stream output, rather than buffering it and writing at the end?

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.