Git Product home page Git Product logo

jqa-junit-plugin's Introduction

jQAssistant Java Plugin

This is the JUnit Plugin of jQAssistant. It enables jQAssistant to scan and to analyze JUnit related artifacts like:

  • JUnit 5 test cases

  • JUnit 4 test cases

  • JUnit 3 test cases

For more information on jQAssistant see https://jqassistant.org.

jqa-junit-plugin's People

Contributors

obfischer avatar dirkmahler avatar stephanpirnbaum avatar aklemp avatar moee avatar

Stargazers

Moncef AOUDIA avatar Eddú Meléndez Gonzales avatar

Watchers

Frank Schwarz avatar  avatar  avatar James Cloos avatar Tobias Israel avatar  avatar

Forkers

moee janmaterne

jqa-junit-plugin's Issues

junit:AssertionMustProvideMessage is jUnit4-specific

Currently, the constraint junit:AssertionMustProvideMessage is part of the junit:Default although, it's implementation is jUnit4-specific. This is due to following two facts:

  • requires only the concept junit4:AssertMethod
  • matches only assert methods whose first parameter is a string

When using jUnit4 and jUnit5 at the same time (not saying that this is okay), jUnit 5 Assert methods will be always reported by this constraint becuase the message will be the last parameter.

There are three options:

  1. move the constraint to the jUni4 group and add a spearate assertions to jUnit 5
  2. update the constraint so that it filters for :JUni4:Assert
  3. extend the constraint so that it supports both version.

My preference would be option 1. Any opinions?

Migrate the Plugin Documentation of the JUnit Plugin to the new Reference Manual

Task Description

Migrate the existing documentation of the JUnit Plugin to the new reference manul.

Definition of Done for the Implementers

  • The reference manual contains the same information as the old user manual
  • The section on the JUnit Plugin in the old user manual points to the section for the plugin in the reference manual

Assertions should be migrated to an abstract concept

Assertions usually come with a test framework like JUnit4 or 5 but others may provide their own assertions, e.g. AssertJ, Hamcrest or Mockito. Therefore any constraints depending on assertions (e.g. junit:TestMethodWithoutAssertion) should require an abstract concept which can be provided by plugins for different frameworks.

fail() not recognized as assertion

The fail()-Method of JUnit 4/5 is currently not being recognized as assertion, therefore false-positives are reported. For implementation #23 should be considered as a pre-requisite.

Use Github Actions to provide a simple CI/CD Buildchain

As core developer of jQAssistant, I want this project to be build on various plattforms with different JDK versions on each commit, so that I know if the change done my the commit does not break the build and the software is fully functional.

The following acceptance criterias must be met:

  • mvn -DskipTests -Djqassistant.skip clean install must pass
  • mvn -Djqassistant.skip clean install must pass
  • mvn -P IT clean install must pass
  • mvn -DskipTests -Djqassistant.skip=false clean install must pass

jUnit 5 - Not all assert-Methods supported

The junit5:AssertMethod concept does not support all assert methods from jUnit 5, thus leading to false positives in the constraint junit:TestMethodWithoutAssertion constraint. This is due to the fact that assert methods are considered as such if the have the following signature void assert.*

Following methods will not be matched:

  • java.lang.Throwable assertThrows
  • T assertTimeout*

Support JUnit 5

Hi,
are there any plans for supporting JUnit 5 in the next Version?

Drop support of Junit 3

JUnit 3 is quite old and after adding support for Junit 5 we should drop the support of Junit 3.

metric groups

According to the XSD and the files junit4.xml and metric.xml there is also a metricGroup and metric element available. What are these for and what is the difference to the metric concepts available in the metric.xml? The documentation doesn't describe these elements.

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.