Skip to content

Minor release #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/cucumblan-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<artifactId>cucumblan-api</artifactId>
<packaging>jar</packaging>
<name>cucumblan-api</name>
<version>1.4.3-SNAPSHOT</version>
<version>1.4.4-SNAPSHOT</version>
<properties>
<json-schema-validator>4.5.1</json-schema-validator>
<cucumblan-utils.version>1.1.6-SNAPSHOT</cucumblan-utils.version>
<cucumblan-utils.version>1.1.7-SNAPSHOT</cucumblan-utils.version>
</properties>
<description>
Cucumblan is a test automation framework that supports Behavior Driven Development (BDD),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public void loadGlobalParam(Map<String, String> globalParams) throws IOException
* @throws IOException the io exception
*/
@Given("^provided all the feature level parameters from file$")
public void loadGlobalParamFromFile() throws IOException {
public void loadGlobalParamFromFile() throws Exception {
Map<String, String> env = System.getenv();
if (env != null && !env.isEmpty()) {
for (String envName : env.keySet()) {
Expand Down Expand Up @@ -332,7 +332,7 @@ public void validateGlobalParam() {
}

@Given("^create variable (.*) as key and (.*) as value$")
public void addVariableSwap(String key, String responseValue) {
public void addVariableSwap(String key, String responseValue) throws Exception{
addVariable(responseValue, key);
}

Expand All @@ -343,17 +343,25 @@ public void addVariableSwap(String key, String responseValue) {
* @param key the key
*/
@Given("^add the (.*) value of the key as (.*)$")
public void addVariable(String responseValue, String key) {
public void addVariable(String responseValue, String key) throws Exception {
if (!this.skipScenario) {

if (responseValue.startsWith("[") && responseValue.endsWith("]")) {
ScenarioContext
.setContext(String.valueOf(Thread.currentThread().getId()), key,
Helper.getActualValueForAll(responseValue, ScenarioContext
.getContext(String.valueOf(Thread.currentThread().getId()))).toString());
} else {
ScenarioContext
.setContext(String.valueOf(Thread.currentThread().getId()), key, responseValue);

Object value = ExcelAndMathHelper.evaluateWithVariableType(
responseValue, ScenarioContext
.getContext(String.valueOf(Thread.currentThread().getId())));
if (value != null) {
ScenarioContext
.setContext(String.valueOf(Thread.currentThread().getId()), key, value.toString());
} else {
ScenarioContext
.setContext(String.valueOf(Thread.currentThread().getId()), key, responseValue);
}
}
}
}
Expand Down Expand Up @@ -500,7 +508,7 @@ public void modifyBooleanVariable(String responseValue, String key) throws Excep
}

@Given("^modify key as (.*) and (.*) as value$")
public void modifyStringVariableSwap(String responseValue, String key) throws IOException {
public void modifyStringVariableSwap(String responseValue, String key) throws Exception {
modifyStringVariable(responseValue, key);
}

Expand All @@ -512,7 +520,7 @@ public void modifyStringVariableSwap(String responseValue, String key) throws IO
* @throws IOException the io exception
*/
@Given("^modify the (.*) value of the key as (.*)$")
public void modifyStringVariable(String responseValue, String key) throws IOException {
public void modifyStringVariable(String responseValue, String key) throws Exception {
if (!this.skipScenario) {
ScenarioContext
.setContext(String.valueOf(Thread.currentThread().getId()), key,
Expand All @@ -522,12 +530,12 @@ public void modifyStringVariable(String responseValue, String key) throws IOExce
}

@Given("^store (.*) as key and api's (.*) as value$")
public void storeResponseAskeySwap(String key, String responseKey) {
public void storeResponseAskeySwap(String key, String responseKey) throws Exception {
storeResponseAskey(null, responseKey, key);
}

@Given("^store-standard type's (.*) with (.*) as key and api's (.*) as value$")
public void storeStandarReposne(String type, String key, String responseKey) {
public void storeStandarReposne(String type, String key, String responseKey) throws Exception {
storeResponseAskey(type, responseKey, key);
}

Expand All @@ -539,11 +547,11 @@ public void storeStandarReposne(String type, String key, String responseKey) {
* @param key the key
*/
@Given("^store the (.*) value of the key as (.*)$")
public void storeResponseAskey(String responseKey, String key) {
public void storeResponseAskey(String responseKey, String key) throws Exception {
storeResponseAskey(null, responseKey, key);
}

public void storeResponseAskey(String type, String responseKey, String key) {
public void storeResponseAskey(String type, String responseKey, String key) throws Exception {
if (!this.skipScenario) {
if (".".equalsIgnoreCase(responseKey)) {
ScenarioContext
Expand Down Expand Up @@ -1077,7 +1085,7 @@ public void before(Scenario scenario) {
*/
@Then("^verify the status code is (\\d+)")
@Then("^the status code is (\\d+)")
public void verifyStatusCode(int statusCode) {
public void verifyStatusCode(int statusCode) throws Exception {
if (!this.skipScenario) {
ScenarioContext
.setContext(String.valueOf(Thread.currentThread().getId()), "STATUS_CODE", String.valueOf(response.getStatusCode()));
Expand Down
4 changes: 2 additions & 2 deletions modules/cucumblan-db/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<artifactId>cucumblan-db</artifactId>
<packaging>jar</packaging>
<name>cucumblan-db</name>
<version>1.3.3-SNAPSHOT</version>
<version>1.3.4-SNAPSHOT</version>
<properties>
<cucumblan-utils.version>1.1.6-SNAPSHOT</cucumblan-utils.version>
<cucumblan-utils.version>1.1.7-SNAPSHOT</cucumblan-utils.version>
</properties>
<description>
Cucumblan-db is a database test automation framework that supports Behavior Driven Development (BDD),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ private JdbcTemplate getJdbcTemplate(String resource) throws Exception {
}

@Given("^store (.*) as key and query's (.*) as value")
public void storeSqlResponseAskeySwap(String key, String responseKey) throws JSONException {
public void storeSqlResponseAskeySwap(String key, String responseKey) throws Exception {
storeSqlResponseAskey(responseKey, key);
}

@Given("^store-sql's (.*) value of the key as (.*)")
public void storeSqlResponseAskey(String responseKey, String key) throws JSONException {
public void storeSqlResponseAskey(String responseKey, String key) throws Exception {
if (!this.skipScenario) {
if (sqlJson != null) {
Map<String, String> mapson = Mapson.buildMAPsonFromJson(sqlJson);
Expand Down
19 changes: 17 additions & 2 deletions modules/cucumblan-message/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.virtualan</groupId>
<artifactId>cucumblan-message</artifactId>
<version>1.3.3-SNAPSHOT</version>
<version>1.3.4-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cucumblan-message</name>
<properties>
<kafka-clients.version>2.7.0</kafka-clients.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cucumblan-utils.version>1.1.6-SNAPSHOT</cucumblan-utils.version>
<cucumblan-utils.version>1.1.7-SNAPSHOT</cucumblan-utils.version>
</properties>
<description>
Cucumblan-message is a cucumber and selenium based test automation framework that supports Behavior Driven
Expand Down Expand Up @@ -146,6 +146,21 @@
<artifactId>cucumblan-utils</artifactId>
<version>${cucumblan-utils.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.19.4</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>3.19.4</version>
</dependency>
</dependencies>

</project>
Loading