श्रेणियाँ, पैकेज और रिपॉज़िटरी खोजें

पैकेज विवरणv2.0.2

junitreport

dart परीक्षण चलाओं से JUnit XML रिपोर्ट उत्पन्न करें। dart या flutter परीक्षणों के आउटपुट को JUnit शैली XML में परिवर्तित करता है

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
3 लाख
लाइक
36
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add junitreport

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

junitreport पैकेज डार्ट या फ्लटर टेस्ट रन से JUnit XML फॉरमैट टेस्ट रिपोर्ट उत्पन्न करता है। यह डिफ़ॉल्ट टेस्ट आउटपुट को CI/CD सिस्टम और टेस्ट डैशबोर्ड के साथ संगत मानक XML संरचना में बदलता है। इससे जेनकिंस, गिटहब एक्शन्स और अन्य प्लेटफॉर्म्स जो JUnit-शैली रिपोर्टिंग की अपेक्षा करते हैं, के साथ सहज एकीकरण संभव होता है। यह पैकेज सभी प्रमुख प्लेटफॉर्म जैसे Android, iOS, Web, macOS, Windows और Linux को समर्थन देता है, जिससे यह क्रॉस-प्लेटफॉर्म टेस्ट ऑटोमेशन वर्कफ्लो के लिए आदर्श है।

उपयोग

  • CI/CD पाइपलाइन रिपोर्टिंग
  • जेनकिंस के साथ परीक्षण परिणामों का एकीकरण
  • GitHub Actions में परीक्षण परिणामों का दृश्यीकरण करें
  • स्वचालित परीक्षण परिणाम एकत्रीकरण
  • क्रॉस-प्लेटफ़ॉर्म परीक्षण रिपोर्टिंग

मुख्य विशेषताएँ

  • Dart परीक्षण आउटपुट को JUnit XML में परिवर्तित करता है
  • सभी फ्लटर प्लेटफॉर्म को समर्थन करता है
  • CI प्रणालियों के साथ आसान एकीकरण
  • हल्का और रिपोर्टिंग पर केंद्रित
  • संरचित, मशीन-पठनीय आउटपुट उत्पन्न करता है

इनके लिए उपयुक्त

  • CI/CD पाइपलाइन्स का उपयोग करने वाली टीमें
  • टेस्ट ऑटोमेशन इंजीनियर्स
  • मानकीकृत परीक्षण रिपोर्ट की आवश्यकता वाले प्रोजेक्ट
  • Jenkins या GitHub Actions के साथ एकीकरण करने वाले विकासकर्मी
  • क्रॉस-प्लेटफ़ॉर्म फ्लटर एप्लिकेशन्स

विचार योग्य बातें

  • परीक्षण रनर में हस्ताक्षर सेटअप की आवश्यकता है
  • परीक्षण नहीं चलाता — केवल आउटपुट को स्वरूपित करता है
  • जटिल परीक्षण सूट के लिए अतिरिक्त कॉन्फ़िगरेशन की आवश्यकता हो सकती है
  • वास्तविक समय परीक्षण डिबगिंग के लिए नहीं बनाया गया है
  • परीक्षण के निष्पादन के बाद आउटपुट स्थिर है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

JUnit Report

Introduction

This application can be used to convert the results of dart tests to JUnit xml reports. These XML reports can then be used by other tools like Jenkins CI.

By running

dart test simple_test.dart --reporter json > example.jsonl
dart pub global run junitreport:tojunit --input example.jsonl --output TEST-report.xml

and the contents of simple_test.dart is

import 'package:test/test.dart';

main() {
  test('simple', () {
    expect(true, true);
  });
}

this program will generate 'TEST-report.xml' containing

<testsuites>
  <testsuite errors="0" failures="0" tests="1" skipped="0" name="simple" timestamp="2016-05-22T21:20:08">
    <properties>
      <property name="platform" value="vm" />
    </properties>
    <testcase classname="simple" name="simple" time="0.026" />
  </testsuite>
</testsuites>

For transforming Flutter tests reports, instead of passing --reporter json, you need to use --machine.

Installation

Run dart pub global activate junitreport to download the program and make a launch script available: <dart-cache>/bin/tojunit.

If the <dart-cache>/bin directory is not on your path, you will get a warning, including tips on how to fix it.

Once the directory is on your path, tojunit --help should be able to run and produce the program help.

Then you can also use the example above much simpler:

dart test simple_test.dart --reporter json | tojunit

And to run all tests for Flutter:

flutter test --machine | tojunit

License and contributors

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 4 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट