How To Install libtest-www-declare-perl on Ubuntu 18.04

In this tutorial we learn how to install libtest-www-declare-perl on Ubuntu 18.04. libtest-www-declare-perl is declarative testing module for web apps

Introduction

In this tutorial we learn how to install libtest-www-declare-perl on Ubuntu 18.04.

What is libtest-www-declare-perl

libtest-www-declare-perl is:

Often in web apps, tests are very dependent on the state set up by previous tests. If one test fails (e.g. “follow the link to the admin page”) then it’s likely there will be many more failures. Test::WWW::Declare aims to alleviate this problem, as well as provide a nicer interface to Test::WWW::Mechanize.

The central idea is that of “flow”. Each flow is a sequence of commands (“fill in this form”) and assertions (“content should contain ’testuser’”). If any of these commands or assertions fail then the flow is aborted. Only that one failure is reported to the test harness and user. Flows may also contain other flows. If an inner flow fails, then the outer flow fails as well.

There are three methods to install libtest-www-declare-perl on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libtest-www-declare-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libtest-www-declare-perl using apt-get by running the following command:

sudo apt-get -y install libtest-www-declare-perl

Install libtest-www-declare-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libtest-www-declare-perl using apt by running the following command:

sudo apt -y install libtest-www-declare-perl

Install libtest-www-declare-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libtest-www-declare-perl using aptitude by running the following command:

sudo aptitude -y install libtest-www-declare-perl

How To Uninstall libtest-www-declare-perl on Ubuntu 18.04

To uninstall only the libtest-www-declare-perl package we can use the following command:

sudo apt-get remove libtest-www-declare-perl

Uninstall libtest-www-declare-perl And Its Dependencies

To uninstall libtest-www-declare-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libtest-www-declare-perl

Remove libtest-www-declare-perl Configurations and Data

To remove libtest-www-declare-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libtest-www-declare-perl

Remove libtest-www-declare-perl configuration, data, and all of its dependencies

We can use the following command to remove libtest-www-declare-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libtest-www-declare-perl

References

Summary

In this tutorial we learn how to install libtest-www-declare-perl package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.