Giter VIP home page Giter VIP logo

riih / dart_test_reporter Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.49 MB

This repository contains various tools and utilities for generating and deploy reports for Dart applications. https://pub.dev/packages/allure_report https://pub.dev/packages/allure_server_cli

Home Page: https://riih.github.io/dart_test_reporter/

License: MIT License

Kotlin 0.05% Swift 0.59% Objective-C 0.01% Dart 83.22% CMake 6.66% C++ 8.70% C 0.30% HTML 0.46%
allure-framework allure-report allure-server dart dartlang allure2

dart_test_reporter's Introduction

Test Reporting utilities

This repository contains various tools and utilities for generating and deploy reports for Dart applications

Allure Demo - GH Pages

Concept

Dart test core packages does not provide a way to inject custom reporting logic when you call dart test.

To workaround this problem there is test_reporter cli tool which wraps dart test process and processes events from it.

test_reporter uses dynamic package loading with Isolates. You can write your own reporter package and provide it to test_reporter. See allure_report for example.

Wrapping test command

Prepend your test command with test_reporter

dart run test_reporter dart test

You can use it with Flutter tests

dart run test_reporter flutter test

You can pass arguments to dart/flutter tests as is

dart run test_reporter flutter test --tags golden --coverage

Usage

  1. Add allure_report and test_reporter to your dependencies.
dev_dependencies:
  # reporter
  allure_report: ^1.0.0
  test_reporter: ^1.0.0
  1. Run test_reporter command with your tests
dart run test_reporter --reporter allure_report -- dart test
- Also you can create `reporter.dart` in project `test` folder with next content

```dart
import 'package:allure_report/allure_report.dart';
import 'package:test_reporter/test_reporter.dart';

TestReporter main(List<String> args) {
    return AllureReporter();
}
```

Output

Allure results are placed in allure-results folder in project root folder.

Warning

Full Allure format is not supported. Not all features are available at the moment.

Full spec support is needs further development

allures is meant to be used to upload reports to OSS Allure Server

See Allure Server repository to find instructions to build it up and running.

Install

dart pub global activate allure_server_cli

Command will be available with name allures

allures --help

Usage

To upload results to Allure server you should zip results to ZIP Archive

zip -r allure-results.zip allure-results/

Then you can upload report to Allure server with nex command

allures --host http://localhost:8080 report --upload allure-results.zip --path develop

See help for additional usage info

allures --help

Disclaimer

Warning

It is hobby-time project created for research of possibility to integrate Dart tests with Allure Reporting Framework.

I am not currently supposed to support it as full-feature set by only myself. It depends on demand and user activity.

Feel free to contribute :-)

dart_test_reporter's People

Contributors

riih avatar

Stargazers

 avatar

Watchers

 avatar  avatar

dart_test_reporter's Issues

Interested in contributing in this project

Hello,

I m trying to use allure report for my flutter integration test project and I came across this project, it seems like something that I need and I am interested in working this project.

Thanks,
C

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.