An open API service indexing awesome lists of open source software.

https://github.com/saeg/jaguarportal-submit


https://github.com/saeg/jaguarportal-submit

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

# Jaguar Portal Submit

Jaguar Portal Submit is a command line application responsible for collecting Spectrum-based Fault Localization (SFL) data generated by the [Jaguar 2](https://github.com/saeg/jaguar2) tool and submitting it to [Jaguar Portal Web](https://github.com/saeg/jaguarportal-web). This application is also available as a GitHub Action, can be used in GitHub Actions and it's available on [GitHub Marketplace](https://github.com/marketplace/actions/jaguarportal).

## Jaguar Portal
Jaguar Portal is a solution composed of a group of tools that together bring the Spectrum-based Fault Localization (SFL) functionality in a continuous integration environment:
- [Jaguar 2](https://github.com/saeg/jaguar2) - JavA coveraGe faUlt locAlization Rank 2 - Jaguar implements the Spectrum-based Fault Localization (SFL) technique for Java programs.
- [Jaguar Portal Web](https://github.com/saeg/jaguarportal-web) - Web API and Web Site responsible for receiving and displaying Spectrum-based Fault Localization (SFL) information.
- [Jaguar Portal Submit](https://github.com/saeg/jaguarportal-submit) - Command Line responsible for submitting Spectrum-based Fault Localization (SFL) data to the Jaguar Portal Web API. This component is also available as a GitHub Action, for use in GitHub Actions.

## How to configure?

Add jaguar2 dependency on your POM.XML:


br.usp.each.saeg
jaguar2-junit4
0.0.2-SNAPSHOT
test


br.usp.each.saeg
jaguar2-jacoco-provider
0.0.2-SNAPSHOT
test


br.usp.each.saeg
jaguar2-xml-exporter
0.0.2-SNAPSHOT
test

And add plugins:


org.jacoco
jacoco-maven-plugin
0.8.7


prepare-agent

prepare-agent



report
prepare-package

report





org.apache.maven.plugins
maven-surefire-plugin



listener
br.usp.each.saeg.jaguar2.junit.JaguarJUnitRunListener



target/classes


In your GitHub Actions add Jaguar Portal Submit:

- name: Submit to Jaguar Portal
uses: saeg/jaguarportal-submit@v0.0.1-snapshot
if: failure()
with:
jaguarPortalProjectKey: {{GENERATED BY JAGUAR PORTAL WEB}}
jaguarPortalHostUrl: {{URL HOSTED YOUR JAGUAR PORTAL WEB}}
jaguarPortalClientId: {{GENERATED BY JAGUAR PORTAL WEB}}
jaguarPortalClientSecret: ${{ secrets.jaguarPortalClientSecret }}
jaguarPortalAnalysisPath: /target

## How to use?
After running a GitHub Action, if any test fails, Jaguar 2 will generate SFL data in the /target directory, and when Jaguar Portal Submit is run, it will collect this data and send it to the Jaguar Portal Web.

The TOP 10 results can be viewed in Annotations itself, see an example:

![image](https://github.com/user-attachments/assets/fca61507-2d23-44ef-955a-351748bd35ec)

You can also view the Pull Request conversation:

![image](https://github.com/user-attachments/assets/eaee7d35-2eb1-4717-a918-119b5357cf16)

Or via the Jaguar Portal Web, where you can view SFL information together with the code, showing suspicious lines marked with colors ranging from green (least suspicious) to red (most suspicious):

![image](https://github.com/user-attachments/assets/b17237d8-a133-4513-952f-217334813492)