Create

Create is where you author test steps, cases, and plans.

Step

The basic building block of a test case is the step. A step has parameters that define the interaction between the remote Agent, Automated Test Equipment, and Device Under Test.

This document section categorizes the parameters of a step into Meta Data, Supervisory, Remote Control, and Remote Query. These categories are for clear documentation and do not appear in Knilb.

_images/step.png

Meta Data

This parameter is only in Knilb.

Description

A short, readable blurb. Knilb displays the Description in many places so a heplful blurb is important.

Supervisory

These parameters are consumed by the Agent, and affect subsequent communication from the Agent to an Automated Test Equipment and/or a Device Under Test.

Location

Either an Automated Test Equipment or a Device Under Test. Knilb substitutes the appropriate URL defined in a Deployment when an Agent runs a test step.

Endpoint

The RESTful endpoint on either an Automated Test Equipment or a Device Under Test.

After

A time delay, in seconds, performed by the Agent before initiating communications to an Automated Test Equipment or a Device Under Test.

Tip

A time delay is helpful to deal with real-world hardware delays.

Example

  • Location DUT

  • Endpoint /foo

  • After 10

Agent prepares communication for http://localhost/foo given a Deployment specifying DUT as localhost, and then the Agent delays communication 10 seconds.

Remote Control

These parameters are consumed by the Agent, and tell the Agent to set/actuate/control a device.

Command

This is the name in the name:value pair in the JSON data model.

Setting

This is the value in the name:value pair in the JSON data model.

Example

  • Command actuate

  • Setting 1

Agent sends {actuate: 1} to http://localhost/foo.

Tip

Recommended the Agent use appropriate HTTP verb, such as HTTP POST, PUT, or PATCH.

Remote Query

The Parameter is consumed by the Agent, and tells the Agent to get a resource from the device.

Condition

The test logic applied to the Parameter that is returned from the device and Value. This parameter is only in Knilb.

Supported Logic

Name

Description

Equals

Comparison of two integers

Contains

Value string is in returned Parameter string

Is True

Boolean

Parameter

The data element from the RESTful Endpoint on the device.

Value

The test value used by the test logic. This parameter is only in Knilb.

Example

  • Condition Equals

  • Parameter bar

  • Value 1

Knilb instructs Agent to get http://localhost/foo. Agent returns the device response, for example {bar: 1}, to Knilb. Then, Knilb then uses assertEqual to compare 1 and 1. In this example, the test would pass since 1 and 1 are equal.

Case

The basic building block of a test plan. A case is a ordered sequence of test steps.

_images/case.png

Create a Case

Click Add Step to add a step to the Case, then select a test step from the dropdown menu.

Steps are exectued in ordered sequence they appear, from left to right. A step may be added multiple times to a Case.

Delete a step by clicking on the X icon. Reordering the steps requires deleting and adding steps.

Tip

A well-written description is helpful to discern between similar test cases.

_images/case_create.png

View Details

Click on the eyeball icon to view details.

You may notice a Case can be added to many Plans.

Plan

A compilation of test cases that define the automated test execution of the Agent.

An Agent may execute the test cases in any order.

_images/plan.png _images/plan_create.png