Using asqatasun from command line

jenkins
cli
api
ci
asqatasun-runner
Tags: #<Tag:0x00007fe6a1821100> #<Tag:0x00007fe6a1820fc0> #<Tag:0x00007fe6a1820e80> #<Tag:0x00007fe6a1820ca0> #<Tag:0x00007fe6a1820b60>

#1

Hello!

I would like to congratulate you for the great job you’re doing with this project.

Well, I work for the government here in Brazil, specifically for the state of Rio Grande do Sul.

We are setting up a development environment to a new web site and we would like to include automated acessibility validation of our project.
It would be very nice if we could make the validations from command line, because our “integration” process is very simple. We are just in the begining of the process on building it. We are completely new in the CI world.

We are running asqatasun from the docker image you provided.

Could you please provide an example using the script runner/Asqatasun.java? We are not used to deal with java tools. We use python programming language here.

Thanks a lot.

Hugs,
Carlos Brum
http://www.mprs.mp.br/


#2

I’m in a similar boat. I have the docker image, and I’m trying to work out how to use the runner cli in order to run accessibility file scans, but I’m struggling to find documentation on how to use it.


#3

hi @louis / @carlosedb,

There is a discussion in French on this subject

ping @mfaure


#4

Hello @carlosedb @louis,

(Thank you for your kind words !)

The actual Docker image of Asqatasun was created just for testing purpose, not for production (understand: made “quick and dirty”; but “done is better than perfect” :wink: )

To use Jenkins, you will have to perform an installation of Asqatasun Runner. You will be able to monitor the evolution of your site(s) within Jenkins and its graphes. If you ever want to see the details of a given audit, you should install a plain Asqatasun and plug it on the database of your Asqatasun Runner.

The above schema is an extract of @softwareklinic’s (excellent) presentation made at a devops meetup. Don’t miss Keyur’s slides and video on accessibility automation

That being said, any kind of help is warmly welcomed! One thing we’re working on is having a better Docker image. To do that, the very first step is to create a Debian package of Asqatasun (entry point: Packaging on Debian wiki) to mimic our shell-installer.

Hope I answered your question. Don’t hesitate if you have question and hope you enjoy Asqatasun :slight_smile:


#5

Hi @mfaure and fabrice ,

Thank you for your reply. I managed to find the french discussion and it helped a little (with my non-existent french, however links are universal :slight_smile: ) but I am still struggling with this installation and have been trying for a few days now. I did realise after a few greps that the docker image did not have the assets required for command line, so I built a ubuntu VM for it.

Still can’t seem to be able to run ./bin/asqatasun_runner without database errors, I’ll keep on it. The documentation found here /master/documentation/en/10_Install_doc/Asqatasun-runner/install-cli-doc.md and /master/documentation/en/20_User_doc/usage-cli-doc.md seem to focus on Tanaguru rather than Asqatasun, presumably they’re related projects. The top level asqatasun-runner documentation readme is blank, the latest link to download in the install-cli-doc returns 404 (all solvable issues) and I’m not sure that Asqatasun comes with the Asqatasun-runner.

It would be worth going through these steps to make sure the documentation is still correct, but I believe these are contributing to myself and @carlosedb struggling to install the asqatasun-runner. I would happily submit a pull request, but I still haven’t quite gotten it to work.

However, to potentially sidestep the issue, does Asqatasun have an API as that would be much better than CLI for me.


#6

look here :


#7

Hi @louis

Sorry, I was not clear: the docker image is not made to run Asqatasun Runner.

The documentation may have mentions of Tanaguru, but seems correct (Asqatasun is the fork of Tanaguru by its creators, like LibreOffice with OpenOffice). Although if you find inconsistencies, please tell us !

Reading another time your message, I wonder: do you actually browse the documentation from http://doc.asqatasun.org/ ? (I’m surprised by the 404 you mention, I’ll check it immediately).

As a side note,we are working on an API, that will solve all these issues, but this is work in progress and not production ready.

For now, maybe a way to solve your problem would be to create a Docker image dedicated to Asqatasun Runner. This could be a really interesting subject !


#8

Hi,

Something weird happened.
As mentionned in the runner installation documentation, the database needs to be installed and populated first :

GRANT USAGE ON * . * TO '$tgUser'@'localhost' IDENTIFIED BY '$tgPassword'; CREATE DATABASE IF NOT EXISTS$tgDatabaseCHARACTER SET utf8; GRANT ALL PRIVILEGES ON$tgDatabase` . * TO ‘$tgUser’@‘localhost’;
FLUSH PRIVILEGES;

mysql -u ${asqatasun-user} -p < install/engine/sql/asqatasun-20-create-tables.sql
mysql -u ${asqatasun-user} -p < install/engine/sql/asqatasun-30-insert.sql
mysql -u ${asqatasun-user} -p < install/rules/sql/10-rules-resources-insert.sql
mysql -u ${asqatasun-user} -p < install/rules/sql/accessiweb2.2-insert.sql
mysql -u ${asqatasun-user} -p < install/rules/sql/rgaa2.2-insert.sql
mysql -u ${asqatasun-user} -p < install/rules/sql/rgaa3.0-insert.sql`

But the install/engine folder is not present in the runner tarball whereas the resources are well-declared in the descriptor file.

We need to understand why and fix it.

Waiting this, you can get the 2 missing scripts (asqatasun-20-create-tables.sql and asqatasun-30-insert.sql) directly from the source, and then follow the documentation.

Once the database installed, edit the conf/context/asqatasun.conf file with the database user and password informations and it’s ready to be used.

The usage page describes precisely how to use the launch script.

2 important things :

  1. Firefox needs to be installed with the expected version and the path to the binary has to be set with the -f option
  2. If the runner is installed on an headless environment (without graphical interface), xvfb needs to be installed and running and the value of the display (99) has to be set with the -d option

Here is a working example of the script :

./bin/asqatasun.sh -f /opt/firefox-31.4.0esr/firefox/ -d 99 -o /tmp/result_output.txt -r Rgaa30 http://asqatasun.org/

Hope it’s clear, and it helps

Regards

Koj


#9

already fixed four weeks ago in the develop branch


#10

fixed in the develop branch.
Thank you @louis for your indication


#11

fixed in release 4.0.3