• Stars
    star
    144
  • Rank 255,590 (Top 6 %)
  • Language
    Java
  • License
    MIT License
  • Created about 10 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Quickstart project for test automation, covering performance, ui acceptance and api acceptance testing

test-automation-quickstart

Java quickstart project for test automation, covering performance, UI acceptance, API acceptance testing and security testing. Created with lessons learned from a large number of development projects to provide all commonly required components and concepts. The framework was first introduced on the OpenCredo.com Blog.

Concepts Included

  • Parallel test runs
  • Shared state across cucumber step definitions
  • Dependency injection
  • Page Object pattern
  • Common web page interaction methods
  • Common api interaction methods
  • Mavenised performance tests
  • Externalised test configuration
  • Commonly used test utility classes
  • Simple security tests

Tools

  • Maven
  • Cucumber-JVM
  • JUnit
  • Spring
  • Selenium Webdriver
  • Jackson
  • JMeter
  • OWASP Zed Attack Proxy

Requirements

In order to utilise this project you need to have the following installed locally:

  • Maven 3
  • Chrome and Chromedriver (UI tests use Chrome by default, can be changed in config)
  • Java 1.8
  • ZAP 2.7.0 (Run it in deamon mode using the following command: ./zap.sh -daemon -port 8888 -config api.disablekey=true)

In order for the api tests to pass, you will need to configure your test email. You may need to set up a testing email account (free ones can be made on gmail.com). Then you can either edit it in the API properties file, or supplied as maven parameters. E.g.

mvn install -Papi-acceptance-tests -Dapi.acceptance.test.email.address=MY_EMAIL_ADDRESS -Dapi.acceptance.test.email.password=MY_EMAIL_PASSWORD

Usage

The project is broken into separate modules for API, UI, Performance and Security testing. Each of these modules can be utilised independently of the others using maven profiles.

To run all modules, navigate to test-automation-quickstart directory and run:

mvn clean install

To run UI acceptance tests only, navigate to test-automation-quickstart directory and run:

mvn clean install -Pui-acceptance-tests

To run API acceptance tests only, navigate to test-automation-quickstart directory and run:

mvn clean install -Papi-acceptance-tests

To run performance tests only, navigate to test-automation-quickstart directory and run:

mvn clean install -Pperformance-tests

To run security tests only, navigate to test-automation-quickstart directory and run:

mvn clean install -Psecurity-acceptance-tests

Reporting

Reports for each module are written into their respective /target directories after a successful run.

UI acceptance tests result in a HTML report for each feature in test-automation-quickstart/ui-acceptance-tests/target/cucumber-parallel/. In the case of test failures, a screen-shot of the UI at the point of failure is embedded into the report.

API acceptance tests result in a HTML report for each feature in test-automation-quickstart/api-acceptance-tests/target/cucumber-parallel/.

Performance tests result in a .jtl results file and .png graphs showing response times and transactions per second, generated in test-automation-quickstart/performance-tests/target/jmeter/results.

Security acceptance tests result in a HTML report for each feature in test-automation-quickstart/security-acceptance-tests/target/cucumber-parallel/. They will also generate a security risks HTML report in test-automation-quickstart/security-acceptance-tests/security-reports/security-report.html.

NOTE: As mentioned, cucumber reports are written to a separate file for each feature. This occurs as a result of running tests in parallel, meaning that you do not get a single unified test report. If using CI, these individual reports can be joined using plugins such as the Jenkins Cucumber-JVM-Reports plugin.

For an alternative approach to combining the cucumber reports, see the parallel testing blog post on OpenCredo.com.

More Repositories

1

terrahelp

Terraform helper. Terrahelp is as a command line utility written in Go and is aimed at providing supplementary functionality which can sometimes prove useful when working with Terraform.
Go
379
star
2

kubefuse

Kubernetes as a FUSE Filesystem
Python
266
star
3

concursus

Java
93
star
4

opencredo-react-boilerplate

JavaScript
64
star
5

proxology

Java
64
star
6

letsencrypt-terraform

Example source code for the blog "Let's Encrypt and Terraform - Getting free certificates for your infrastructure" - https://opencredo.com/letsencrypt-terraform
HCL
57
star
7

neo4j-in-action

Java
37
star
8

opencredo-esper

Spring support classes for Esper
Java
27
star
9

ruby-acceptance-testing-quickstart

A quickstart project to start web acceptance testing within minutes.
Ruby
26
star
10

angular2-boilerplate

TypeScript
24
star
11

mesos_framework_demo

A sample Mesos framework
Java
19
star
12

tornado-analytics

JavaScript
18
star
13

akka-java8-examples

Simple examples of using Akka Java 8 interface
Java
17
star
14

mesos_service_discovery

Service Discovery script for Mesos and Marathon
Go
15
star
15

js-api-testing-quickstart

A quickstart project for testing APIs with javascript, mocha and chai
JavaScript
15
star
16

springkoans

Koans for the Programming Spring book from O'Reilly
Java
14
star
17

kafka-connect-venafi

Kafka connector for Venafi Security Events
Java
12
star
18

spring-data-cassandra-example

Java
10
star
19

golang-api-test-quickstart

Test APIs with golang
Go
8
star
20

self-testing-vault

Ruby
7
star
21

log-classifier

Log Classifier
Python
4
star
22

cassandra-spark-ansible

Jinja
3
star
23

secure-pipeline-verifier

PoC for Secure CI/CD Pipeline project that makes use of policy-as-code to check configuration and settings in a repository making use of GitHub REST APIs or GitLab REST APIs and Open Policy Agent OPA
Go
3
star
24

opa-single-message-transformer

A single message transformer that filters based on OPA policies
Java
3
star
25

si-cep-samples

Java
2
star
26

springboot-workshops

JavaScript
2
star
27

vault-pki-demo

Shell
1
star
28

hacking-k8s-on-mac

HCL
1
star
29

hierarchical-expansion-blog

A repository holding the companion notebook to the Hierarchical Expansion blog post
Jupyter Notebook
1
star
30

neo4j-puppet

Puppet module to install Neo4j Graph Database Server
Puppet
1
star
31

sample-terragrunt-bootstrap

When first adopting Terragrunt, there is a bootstrapping challenge around setting up remote state and locking resources.
HCL
1
star
32

neo4j-cluster

Neo4j development cluster
1
star