Skip to content

Zendesk e2e enhancement #5

Open
Vipinofficial11 wants to merge 2 commits intodevelopfrom
E2E_Test_Enhancement
Open

Zendesk e2e enhancement #5
Vipinofficial11 wants to merge 2 commits intodevelopfrom
E2E_Test_Enhancement

Conversation

@Vipinofficial11
Copy link

No description provided.

Then Validate record created in Sink application for Single object is equal to expected output file

@TS-ZD-RNTM-MACRO-02 @BQ_SINK @BQ_SINK_CLEANUP @FILE_PATH
@TS-ZD-RNTM-MACRO-02 @BQ_SINK @BQ_SINK_CLEANUP @TEST_DATA @DELETE_TEST_DATA
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook's value is @CREATE_GROUP I guess you have used a wrong one here.

Feature: Zendesk Source - Run time scenarios

@TS-ZD-RNTM-MACRO-01 @BQ_SINK @BQ_SINK_CLEANUP @FILE_PATH
@TS-ZD-RNTM-MACRO-01 @BQ_SINK @BQ_SINK_CLEANUP @TEST_DATA @DELETE_TEST_DATA
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook's value is @CREATE_GROUP, update the value here.

*/
public class TestSetupHooks {
private static boolean firstFileSinkTestFlag = true;
public static String testdata_Group = "";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use camel case in the naming instead of underscore. (testdata_Group -> groupResponse)

public class TestSetupHooks {
private static boolean firstFileSinkTestFlag = true;
public static String testdata_Group = "";
public static String cred = "";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change cred -> credentials

public void deleteGroup() {
DataValidationHelper.deleteGroup(cred);
}
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the indentation

* Zendesk utility - enhancements.
*/
public class DataValidationHelper {
private static String baseURI = "https://cloudsufi.zendesk.com/api/v2";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can put this base URI in the plugin parameter properties file.

.header("authorization", cred)
.delete(baseURI + "/groups/" + ZendeskPropertiesPageActions.uniqueId + ".json");
}
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix Indentation

BigInteger uniqueId = expectedOutputAsJson.get("id").getAsBigInteger();
JsonObject expectedOutputAsJson = gson.fromJson(TestSetupHooks.testdata_Group, JsonObject.class);
JsonObject group = (JsonObject) expectedOutputAsJson.get("group");
System.out.println(group);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove System.out.println()

}


public static void verifyIfRecordCreatedInSinkForMultipleObjectsAreCorrect(String expectedOutputFile)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert all the spacing related changes in this method.

return mapDifference.areEqual();
}

public static void getBigQueryTableData(String dataset, String table, BigInteger uniqueId)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have written the altered query here specifically for groups but this method getBigQueryTableData is common and can be used to fetch data from any big query table, this will throw an error if the table consist data of another object. (For ex: Tags may not have field like updatedAt and createdAt).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The objects we are using : Groups and Organisations , both have the same fields.


private static final String MOCK_STAGE = "mockStage";
private static MockPipelineConfigurer pipelineConfigurer = null;
private static MockPipelineConfigurer pipelineConfigure = null;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this change, not related to Automation.

ZendeskBatchSource zendeskBatchSource = new ZendeskBatchSource(config);
pipelineConfigurer = new MockPipelineConfigurer(null);
zendeskBatchSource.configurePipeline(pipelineConfigurer);
pipelineConfigure = new MockPipelineConfigurer(null);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert these changes.

ZendeskBatchMultiSource zendeskBatchMultiSource = new ZendeskBatchMultiSource(config);
pipelineConfigurer = new MockPipelineConfigurer(null);
zendeskBatchMultiSource.configurePipeline(pipelineConfigurer);
pipelineConfigure = new MockPipelineConfigurer(null);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert these changes.

@satyamsufi satyamsufi force-pushed the E2E_Test_Enhancement branch from 230dd4e to 3833653 Compare March 2, 2023 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants