Skip to content

Implement cloud driver#1

Open
pb2323 wants to merge 14 commits intomasterfrom
implement_cloud_driver
Open

Implement cloud driver#1
pb2323 wants to merge 14 commits intomasterfrom
implement_cloud_driver

Conversation

@pb2323
Copy link
Owner

@pb2323 pb2323 commented Mar 6, 2023

Description

  • This pull request addresses the issue described here: #<?>

In this pull request, I have …


For features/enhancements:

  • I have added/updated the relevant references in the documentation files.

For API changes:

  • I have made the necessary changes in the types index file.

this._deviceConfig = deviceConfig;
this._sessionConfig = sessionConfig;
// @ts-ignore
this._sessionConfig.sessionId = sessionConfig.sessionId || uuid.UUID();
Copy link
Owner Author

Choose a reason for hiding this comment

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

When multiple test suites are present in a session, web socket connection is closed after the execution of each test suite, and a new web socket connection is created, thus web socket id changes, but session id remains constant for each test suite. Therefore, to ensure that the same device is used for all the test suites in a test, we want this unique identifier(session_id). Thus, we cannot let users define this.


get timeout() {
return 1000;
return 240000;
Copy link
Owner Author

Choose a reason for hiding this comment

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

This timeout is increased because in cloud sessions, we do device allocation/app installation, etc after receiving this message and then return the reponse to it.

if (isCloudSession) {
cliConfig.reuse = false;
cliConfig.cleanup = false;
cliConfig.reuse = true;
Copy link
Owner Author

Choose a reason for hiding this comment

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

Changed default value for reuse to true and shutdownDevice to false for cloud sessions

if (session.build != null) {
const value = session.build;
if (typeof value !== 'string' || value.length === 0) {
if (typeof value !== 'string') {
Copy link
Owner Author

@pb2323 pb2323 Mar 13, 2023

Choose a reason for hiding this comment

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

We can allow empty string for build/project/name options.

@@ -0,0 +1,76 @@
class CloudArtifactsManager {
Copy link
Owner Author

Choose a reason for hiding this comment

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

We have created this ArtifactsManager class because artifacts are being managed by us and we don't want any logs related to artifacts management in our tester logs.
All the methods here are the callbacks for the events happening throughout the test cycle

await this.uiDevice.pressHome();
}

// Deep to come back
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should remove this comment

}
}

// Do we want to throw error if terminate app fails
Copy link
Collaborator

@avinash-bharti avinash-bharti Mar 21, 2023

Choose a reason for hiding this comment

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

what's the resolution of this?

Copy link
Owner Author

Choose a reason for hiding this comment

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

If terminate app fails, hub sends serverError type in response because of which script exits.

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