npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

taclio

v1.1.0-beta.4

Published

Test Automation Controller Language

Downloads

58

Readme

tacl

Version

Tacl (Test Automation Controller Language) is a framework that enables the writing of complete end-to-end test automation as configurations. Tacl is simple and easy to learn.

Tacl Test consists of four modules: features, steps, elements and dataset. All four modules are defined in .tacl files that follows yaml file pattern.

Let's install tacl and run a playground test.

Installation

Tacl comes with a runner to run tacl test. The prerequisite to install tacl is node. For more information on installing Node.js, visit Node.js

To install the latest version of tacl, enter the following command

npm install -g taclio

Tacl has to be installed globally. Don't forget the -g option in the install command

Enter tacl -h to know more about the command line options.

Scaffolding Tacl Test

Once you have installed tacl, you can scaffold a tacl test by entering the following command.

tacl init

The above command will create all the base structure of the workspace and also comes with a tacl playground test. The folder structure would look like this:

tacl
├── data
│   ├── dataset.tacl
├── features
│   ├── playground.tacl
├── elements
│   ├── elements.tacl
├── steps
│   └── steps.tacl
tacl.json

Run Playground Test

Run your tacl playground test by entering the following command

tacl run

This should open Tacl Playground and run a test over all the actions and assertions currently supported by tacl.

Tacl Test

Tacl test consists of four modules: features, elements, steps, data. When you scaffolded the workspace, all these folders with a sample tacl file should have been created for you. Let's take a look into the files in details

Feature

A feature file, for example playground.tacl has the definition of the feature and scenarios that are part of the feature. A sample feature file would look like this:

name: "Tacl Playground"
description: "Tacl Playground to showcase the available actions and assertions"
scenarios:
  - name: Tacl Playground Test
    description: "Testing of Actions and Assertions in tacl playground"
    steps:
      - Given Open tacl playground
      - Then Interact with type
      - Then Interact with fill
      - Then Interact with select
....
....

Steps

A step file, for example steps.tacl contains the definition of all steps involved in a feature. It is a central place to define all steps and make them reusable in multiple scenarios. A sample step file would look like this:

# Steps can be reused in multiple scenarios
- Given: "Open tacl playground" # It's a step Then mentioned in feature file
  actions:
    - do: open $(start_url)

- Then: "Interact with type" # It's a step Then mentioned in feature file
  # Defining all actions needed to perform the step
  actions:
    - do: click type_menu
    - do: type $(simple_string) on type_simple
    - do: type $(multiline_string) on type_multiline
    - do: type $(char_string) on type_char

- Then: "Interact with fill" # It's a step Then mentioned in feature file
  actions:
    - do: click fill_menu
    - do: fill $(simple_string) on fill_simple # Values can also be variables. See dataset.tacl
    - do: fill $(multiline_string) on fill_multiline
    - do: fill $(char_string) on fill_char
    - do: assert fill_char_count
      condition: contains
      value: "4 / 5"
....
....

Elements

An element file, for example elements.tacl is the central place where all HTML elements involved in steps are declared. They can be reused in the element attribute of actions. A sample elements file will look like this:

#
# Type
#
- name: type_menu
  locator: "button[role='menuitem']:has-text('Type')"
- name: type_simple
  locator: '#mat-input-0'
- name: type_multiline
  locator: textarea
- name: type_char
  locator: "[placeholder=\"Ex\\. 12345\"]"
- name: char_count
  locator: text=4 / 5

#
# Fill
#
- name: fill_menu
  locator: "button[role='menuitem']:has-text('Fill')"
- name: fill_simple
  locator: '#mat-input-4'
- name: fill_multiline
  locator: textarea
- name: fill_char
  locator: "[placeholder=\"Ex\\. 12345\"]"
- name: fill_char_count
  locator: text=4 / 5
....
....

Dataset

A dataset file, for example dataset.tacl is the central place where all test data needed for the execution of the scenarios are declared. A sample dataset file will look like this:

variables:
  - name: simple_string
    value: Test Automation

  - name: multiline_string
    value: |-
      Tacl Testing
      This is a multiline string

  - name: char_string
    value: '1234'

  - name: start_url
    value: 'https://playground.tacl.io'

datasets:
  - name: dataset 1
    data:
      - variable: simple_string
        value: Testing with Tacl
  - name: dataset 2
    data:
      - variable: simple_string
        value: Tacl is great

Dataset is optional Dataset is an optional module. It is needed only if you want to use variables in your actions instead of a constant value.

Checkout our Documentation to start with tacl test