Use Amazon IoT Greengrass Testing Framework
Greengrass Testing Framework (GTF) is a collection of building blocks that supports end-to-end
automation from the customer perspective. GTF uses Cucumber
GTF is implemented using Cucumber, a tool used to run automated tests, to encourage a
Behavior-Driven Development (BDD) of the components. In Cucumber, the features of this system
are outlined in a special type of file called feature
. Each feature is
described in a human-readable format called scenarios which are specifications that can be
converted into automated tests. Each scenario is outlined as a series of steps that define the
interactions and outcomes of this system under test using a domain-specific language called
Gherkin. A Gherkin step
Topics
How it works
Amazon IoT Greengrass distributes the GTF as a standalone JAR that consists of several Java modules. To use GTF for end-to-end testing of components, you must implement the tests within a Java project. Adding the testing standable JAR as a dependency in your Java project enables you to use the existing functionality of the GTF and extend it by writing your own custom test cases. To run the custom test cases, you can build your Java project and run the target JAR with the configuration options described in Greengrass Testing Framework configuration options.
GTF standalone JAR
Greengrass uses Cloudfront as a Maven
GTF standalone JAR includes the following modules. It is not limited to only these
modules. You can pick and choose each of these dependencies separately in your project or
include all of them at once with the testing standalone JAR file
-
aws-greengrass-testing-resources
: This module provides abstraction for managing the lifecycle of an Amazon resource during the course of a test. You can use this to define your custom Amazon resources usingResourceSpec
abstraction so GTF can take care of creation and removal of those resources for you. -
aws-greengrass-testing-platform
: This module provides platform-level abstraction for the device under test during the test lifecycle. It contains APIs used to interact with the OS independent of the platform and can be used to simulate the commands running in the device shell. -
aws-greengrass-testing-components
: This module consists of sample components that are used for testing the Greengrass core features such as deployments, IPC, and other features. -
aws-greengrass-testing-features
: This module consists of reusable common steps and their definitions which are used for testing within in the Greengrass environment.
Topics
Changelog
The following table describes the changes in each version of the GTF. For more
information, see the GTF Releases
page
Version |
Changes |
---|---|
1.2.0 |
|
1.1.0 |
|
1.0.0 |
Initial version. |