Skip to content
Snippets Groups Projects
Commit 62daf5ec authored by Rosen Georgiev's avatar Rosen Georgiev
Browse files

Health checks

parent 31b15600
No related branches found
No related tags found
2 merge requests!11sync,!7Health checks
Showing
with 86 additions and 551 deletions
.gradle
.idea
build
logs
.classpath
.project
bin
.settings
*.iml
local.properties
logs
QA.log
out
.DS_Store
# Java
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
target/**
# Test results
build/reports/
build/test-results/
build/tmp/
\ No newline at end of file
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/test/java/api/test/rest/ocm/connection/ConnectionStepDefinitions.java" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
File deleted
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - Class RegressionTestSuite</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<script src="../js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>Class RegressionTestSuite</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt;
<a href="../packages/default-package.html">default-package</a> &gt; RegressionTestSuite</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">1</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">1</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox failures" id="successRate">
<div class="percent">0%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div id="tabs">
<ul class="tabLinks">
<li>
<a href="#tab0">Failed tests</a>
</li>
<li>
<a href="#tab1">Tests</a>
</li>
<li>
<a href="#tab2">Standard error</a>
</li>
</ul>
<div id="tab0" class="tab">
<h2>Failed tests</h2>
<div class="test">
<a name="initializationError"></a>
<h3 class="failures">initializationError</h3>
<span class="code">
<pre>courgette.runtime.CourgetteTestFailureException: There were failing tests. Refer to the Courgette html report for more details.
</pre>
</span>
</div>
</div>
<div id="tab1" class="tab">
<h2>Tests</h2>
<table>
<thead>
<tr>
<th>Test</th>
<th>Duration</th>
<th>Result</th>
</tr>
</thead>
<tr>
<td class="failures">initializationError</td>
<td class="failures">0s</td>
<td class="failures">failed</td>
</tr>
</table>
</div>
<div id="tab2" class="tab">
<h2>Standard error</h2>
<span class="code">
<pre>Apr 15, 2022 4:56:26 PM cucumber.runtime.filter.TagExpressionOld isOldTagExpression
WARNING: Found tags option '~@wip'. Support for '~@tag' will be removed from the next release of Cucumber-JVM. Please use 'not @tag' instead.
</pre>
</span>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 7.4.1</a> at Apr 15, 2022, 4:56:29 PM</p>
</div>
</div>
</body>
</html>
......@@ -20,13 +20,13 @@
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">1</div>
<div class="counter">0</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">1</div>
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
......@@ -38,7 +38,7 @@
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0s</div>
<div class="counter">-</div>
<p>duration</p>
</div>
</td>
......@@ -47,8 +47,8 @@
</div>
</td>
<td>
<div class="infoBox failures" id="successRate">
<div class="percent">0%</div>
<div class="infoBox success" id="successRate">
<div class="percent">-</div>
<p>successful</p>
</div>
</td>
......@@ -58,52 +58,10 @@
<div id="tabs">
<ul class="tabLinks">
<li>
<a href="#tab0">Failed tests</a>
</li>
<li>
<a href="#tab1">Packages</a>
</li>
<li>
<a href="#tab2">Classes</a>
<a href="#tab0">Classes</a>
</li>
</ul>
<div id="tab0" class="tab">
<h2>Failed tests</h2>
<ul class="linkList">
<li>
<a href="classes/RegressionTestSuite.html">RegressionTestSuite</a>.
<a href="classes/RegressionTestSuite.html#initializationError">initializationError</a>
</li>
</ul>
</div>
<div id="tab1" class="tab">
<h2>Packages</h2>
<table>
<thead>
<tr>
<th>Package</th>
<th>Tests</th>
<th>Failures</th>
<th>Ignored</th>
<th>Duration</th>
<th>Success rate</th>
</tr>
</thead>
<tbody>
<tr>
<td class="failures">
<a href="packages/default-package.html">default-package</a>
</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0s</td>
<td class="failures">0%</td>
</tr>
</tbody>
</table>
</div>
<div id="tab2" class="tab">
<h2>Classes</h2>
<table>
<thead>
......@@ -116,18 +74,7 @@
<th>Success rate</th>
</tr>
</thead>
<tbody>
<tr>
<td class="failures">
<a href="classes/RegressionTestSuite.html">RegressionTestSuite</a>
</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0s</td>
<td class="failures">0%</td>
</tr>
</tbody>
<tbody/>
</table>
</div>
</div>
......@@ -138,7 +85,7 @@
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 7.4.1</a> at Apr 15, 2022, 4:56:29 PM</p>
<a href="http://www.gradle.org">Gradle 7.2</a> at Jun 17, 2022, 5:00:16 PM</p>
</div>
</div>
</body>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - Default package</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<script src="../js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>Default package</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt; default-package</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">1</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">1</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox failures" id="successRate">
<div class="percent">0%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div id="tabs">
<ul class="tabLinks">
<li>
<a href="#tab0">Failed tests</a>
</li>
<li>
<a href="#tab1">Classes</a>
</li>
</ul>
<div id="tab0" class="tab">
<h2>Failed tests</h2>
<ul class="linkList">
<li>
<a href="../classes/RegressionTestSuite.html">RegressionTestSuite</a>.
<a href="../classes/RegressionTestSuite.html#initializationError">initializationError</a>
</li>
</ul>
</div>
<div id="tab1" class="tab">
<h2>Classes</h2>
<table>
<thread>
<tr>
<th>Class</th>
<th>Tests</th>
<th>Failures</th>
<th>Ignored</th>
<th>Duration</th>
<th>Success rate</th>
</tr>
</thread>
<tr>
<td class="failures">
<a href="../classes/RegressionTestSuite.html">RegressionTestSuite</a>
</td>
<td>1</td>
<td>1</td>
<td>0</td>
<td>0s</td>
<td class="failures">0%</td>
</tr>
</table>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 7.4.1</a> at Apr 15, 2022, 4:56:29 PM</p>
</div>
</div>
</body>
</html>
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string"
},
"code": {
"type": "string"
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"Status": {
"type": "string"
},
"TransactionID": {
"type": "string"
},
"BatchID": {
"type": "string"
}
},
"required": [
"Status",
"TransactionID",
"BatchID"
]
},
{
"type": "object",
"properties": {
"Status": {
"type": "string"
},
"TransactionID": {
"type": "string"
},
"BatchID": {
"type": "string"
}
},
"required": [
"Status",
"TransactionID",
"BatchID"
]
}
]
}
},
"required": [
"status",
"code",
"data"
]
}
\ No newline at end of file
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"status",
"code",
"data",
"counters"
],
"properties": {
"status": {
"$id": "#root/status",
"title": "Status",
"type": "string",
"default": "",
"examples": [
"OK"
],
"pattern": "^.*$"
},
"code": {
"$id": "#root/code",
"title": "Code",
"type": "string",
"default": "",
"examples": [
"200"
],
"pattern": "^.*$"
},
"data": {
"$id": "#root/data",
"title": "Data",
"type": "integer",
"examples": [
50
],
"default": 0
},
"counters": {
"$id": "#root/counters",
"title": "Counters",
"type": "object",
"required": [
"receivedStatus",
"storedStatus",
"anchoredStatus",
"anchoredBatches"
],
"properties": {
"receivedStatus": {
"$id": "#root/counters/receivedStatus",
"title": "Receivedstatus",
"type": "integer",
"examples": [
50
],
"default": 0
},
"storedStatus": {
"$id": "#root/counters/storedStatus",
"title": "Storedstatus",
"type": "integer",
"examples": [
50
],
"default": 0
},
"anchoredStatus": {
"$id": "#root/counters/anchoredStatus",
"title": "Anchoredstatus",
"type": "integer",
"examples": [
50
],
"default": 0
},
"anchoredBatches": {
"$id": "#root/counters/anchoredBatches",
"title": "Anchoredbatches",
"type": "integer",
"examples": [
40
],
"default": 0
}
}
}
}
}
#Copyright (c) 2018 Vereign AG [https://www.vereign.com]
#
#This is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as
#published by the Free Software Foundation, either version 3 of the
#License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU Affero General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#http://localhost/api/getStatuses
#Author: Rosen Georgiev rosen.georgiev@vereign.com
@rest @batch @all
Feature: API - getStatuses POST
Get the previously added Batches
Background:
Given we are testing the VIAM Api
@getStatuses @test
Scenario: Send a batch request and then fetch it with getStatuses - Positive
#Send Batch
Given I load the REST request {Batch.json} with profile {successful_batch}
Given I send a new random batch request via API
And the status code should be {200}
#Get Statuses
Then I wait for {60000} mseconds
Given I clear the request body
Then I call getStatuses with the current sealKey via API
And the status code should be {200}
And the field {$.status} has the value {OK}
And the field {$.code} has the value {200}
And the response is valid according to the {Batch_GetStatuses_schema.json} REST schema
And I assert that getStatus status is the same as the sendBatch value via API
@getStatuses @negative
Scenario Outline: Try to call getStatuses with invalid request - <profile> - Negative
#Get Statuses
Given I clear the request body
Given I load the REST request {Batch.json} with profile {<profile>}
Then I call getStatuses request via API
And the status code should be {400}
And the field {$.message} has the value {<msg>}
Examples:
| profile | msg |
| getStatuses_missing_key | sealID (key) is missing |
| getStatuses_missing_value | sealID (key) is missing |
| getStatuses_empty | sealID (key) is missing |
@sendbatch
Scenario: Send a batch requests with 2 objects and then get them - Positive
#Send Batch
Given I load the REST request {Batch.json} with profile {successful_batch}
Then I send a new random batch request with 2 objects via API
And the status code should be {200}
And the field {message} has the value {batch is queued}
#Get Statuses of seal key 1
Then I wait for {60000} mseconds
Given I clear the request body
Then I call getStatuses with the current sealKey via API
And the status code should be {200}
And the response is valid according to the {Batch_GetStatuses_schema.json} REST schema
And I assert that getStatus status is the same as the sendBatch value via API
#Get Statuses of seal key 2
Given I clear the request body
Then I call getStatuses with the current sealKey2 via API
And the status code should be {200}
And the response is valid according to the {Batch_GetStatuses_schema.json} REST schema
And I assert that getStatus status is the same as the sendBatch value via API
@sendbatch
Scenario: Send 2 separate batch requests for the same key and then get them - Positive
#Send Batch
Given I load the REST request {Batch.json} with profile {successful_batch}
Given I send a new random batch request via API
And the status code should be {200}
Then I send a new batch request via API
And the status code should be {200}
And the field {message} has the value {batch is queued}
#Get Statuses
Then I wait for {120000} mseconds
Given I clear the request body
Then I call getStatuses with the current sealKey via API
And the status code should be {200}
And the field {$..Status} contains {2} elements
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="RegressionTestSuite" tests="1" skipped="0" failures="1" errors="0" timestamp="2022-04-15T13:56:29" hostname="vereign-e4802" time="0.0">
<properties/>
<testcase name="initializationError" classname="RegressionTestSuite" time="0.0">
<failure message="courgette.runtime.CourgetteTestFailureException: There were failing tests. Refer to the Courgette html report for more details." type="courgette.runtime.CourgetteTestFailureException">courgette.runtime.CourgetteTestFailureException: There were failing tests. Refer to the Courgette html report for more details.
</failure>
</testcase>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[Apr 15, 2022 4:56:26 PM cucumber.runtime.filter.TagExpressionOld isOldTagExpression
WARNING: Found tags option '~@wip'. Support for '~@tag' will be removed from the next release of Cucumber-JVM. Please use 'not @tag' instead.
]]></system-err>
</testsuite>
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment