Skip to content

Conversation

@kowalcj0
Copy link

@kowalcj0 kowalcj0 commented Dec 17, 2017

This adds simple a JSON & JUNIT reporters and in case of the JSON reporter it will also extract information about link's target attribute, which can come in handy when you have to quickly check which links open in new tab/window.

TODO

  • add tests

Here's an example command that checks the links and generates a JSON report:

To generate a JSON report:

pylinkvalidate.py \
    --progress \
    --types=a \
    --format=json \
    --output=report.json \
    --console \
    --timeout=25 \
    --depth=1 \
    --test-outside \
    --workers=10 \
    --parser=lxml \
    --header="User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.97 Safari/537.36 Vivaldi/1.94.1008.36" \
    https://www.example.com

and to generate a JUNIT report:

pylinkvalidate.py \
    --progress \
    --types=a \
    --format=junit \
    --output=report.xml \
    --console \
    --timeout=25 \
    --depth=1 \
    --test-outside \
    --workers=10 \
    --parser=lxml \
    --header="User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.97 Safari/537.36 Vivaldi/1.94.1008.36" \
    https://www.example.com

@kowalcj0 kowalcj0 changed the title basic JSON reporter basic JSON & JUNIT reporters May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant