Sanity check

What is a sanitary test ? And why ?

When developing a website evolves and the risk of regressions and sending bugs in the production is real.

To prevent these problems, you can automate some manual tests with Weasel.

Great but how ?

Different steps

  • We make a configuration (screen size and browser)
  • The (to) automate scenario (s) is described
  • For the bravest we can create a campaign that will launch all these tests!

Create a configuration

To begin with, you need to know your configuration so that the test is more consistent with your tools. To do so, you can create a configuration in which you can send us your screen size, the (or) virtual machine (s) and ultimately the navigator you use:

For this we go to the subcomponent “Configurations” and click on the plus button.

alt text

A dialog opens and we have to fill in the first part:

alt text

Here our config is called “config_laptop” and the dimensions are 1366768 pixels because these are classic resolutions for a computer.

In the “virtual machines / browsers” section.

Click on the ‘+’ to add a virtual machine and the browser (the browser is configured according to that for making the config).

alt text

Now we click on the “save” button to complete our configuration and we can go to another part.

Create a test case

Now that the configuration is complete, you can make your tests to know if there are any errors or if there is a problem on your site. Let us go to the sub-section “Test case” and for the configuration, a click on the plus button is necessary.

alt text

A dialog opens and we have to fill in the first part:

alt text

Our test is called “Simple Connection”, currently present in no campaign. We select our previous configuration.

Here are two steps:

  • Open the Weasel Spark page
  • Write the login in the domain with id “input_login”

A test always starts with a step with Open as its command.

It is possible to place one or more goals. For our example, we have 2 different goals:

  • via the domain ID
  • via the CSS path

Placing multiple goals is interesting if the first one does not work. The selenium motor tests the second. This solves the problems of recordings of different id / name …

Another way to create a test case

When consulting a session, we can convert this session to a test case: To do this, you must consult a session (see Sessions doc), and then in the banner click on the conversion button.

alt text

alt text

Do not forget to give the correct configuration and a name before you save.

Create a campaign

Do you want to simplify your life by pressing a button and starting your test cases? Just create a campaign and add to this campaign the tests to run, simply not?

Go to the sub-section “Campaigns” and in the same way a click is needed on the + button.

alt text

A dialog opens and we have to fill in the first part:

alt text

Our campaign is called “config laptop campaign”. The configuration is made from us above. Now only fill in the tests for this campaign.

alt text

We just need to record our campaign and we can finally start this test.

Start a test

Click on the icon to start the test. .

View a report from our test case

When the test is complete, there is an icon or according to the result of the test.

Now that our test has been completed, we can consult it to see if everything went well.

alt text

An error occurred during the test run, with this report we can easily know the problematic step and the video that shows the simulation of the test.

From there we can go back to the list of steps and solve the problem.

From this place we also have access to the old reports:

alt text