Skip to content

Conversation

@denghj
Copy link

@denghj denghj commented Jun 18, 2018

  1. Adding RestApiUtils to utilize https://developers.perfectomobile.com/display/PD/REST+API
    from within the qunatum
  2. Added a pre driver launch checkup, if device is inUse, unavailable, not connected then not trying to starting the driver, intent to eliminate the Device In Use failures in Digital Zoom report

@denghj
Copy link
Author

denghj commented Jun 18, 2018

Sure no problem Jack. Feel free. Yea let’s discuss on the thread ;) I rather have it fail the test case saying no device to execute the test. I want the customer to complain that their tests are not running and fix their broken framework. But again, let’s open it for discussion on the thread.

Thanks,

-Raj

From: Jack Deng
Sent: Monday, June 18, 2018 2:28 PM
To: Raj Pasupathy rajp@perfectomobile.com
Cc: PSGroup PSGroup@perfectomobile.com
Subject: Re: Eliminate the Device In Use errors from the digital Zoom Report

Hi Raj,

Thanks for reply, that’s actually a problem with this solution.
I embedded this mechanism inside beforeinitialization method. Therefore when it checks the device is unavailable it skips the driver launches, then the immediately following TCs would be failing due to the driver is not initialized.

I am wondering what is the best way to exit the whole testset gracefully from the Listener?

BTW, do you mind if I will post your email to the pull request discussion thread?
I do believe this part will need some thorough discussion.

Thanks
Jack

From: Raj Pasupathy rajp@perfectomobile.com
Date: Monday, June 18, 2018 at 1:21 PM
To: Jack Deng jackd@perfectomobile.com, PSGroup PSGroup@perfectomobile.com
Subject: RE: Eliminate the Device In Use errors from the digital Zoom Report

Thanks Jack, I think this is great. Good to know!

Questions:
So if a device is in use/unavailable or whatever status, does it fail the test case or does it provide a soft assert?

Best,

@eyalyovel2
Copy link

Hi Eyal

Thanks for the input, I am thinking to add a switch to this so to have it work as an optional feature. I will make sure it will be turned off by default.
I still think it will help in some accounts where these kind of errors dominate the major noise failures. You never know when DZ will add the mentioned feature

Of course it will up to Hadas and Kulin to decide if it’s allowed to be merged to the master.

Please add further comments to the pull requests so they will all be tracked and discussed

Thanks
Jack


This email was sent from my mobile device.
Please execuse any typo or autocorrects
From: Eyal Yovel
Sent: Monday, June 18, 2018 5:44:41 PM
To: Jack Deng; Raj Pasupathy
Subject: Re: Eliminate the Device In Use errors from the digital Zoom Report

Hi Jack,

Yes, I also thought that probably the new DZ will solve this issue 👌.

I am new at Perfecto so maybe I am talking nonsense but if this solution is only for your client why you push it to the master and not having your own branch (especially if you said it is temporary)?
Or if you do push it to master and some clients will prefer missing tests and some will prefer getting errors, maybe add configuration somewhere for select the desired behaviour.

Thanks and regards,
Eyal

@kulin24
Copy link
Contributor

kulin24 commented Jun 19, 2018

Thanks Jack for creating the pull request.

I agree with Raj that we should want the tests to fail by default so that the clients will be able to track all the failures, including the device failures in their reports.

However, I like the idea of creating a switch so that for specific clients we can remove the noise in the reports if required. One thing that we need to check is how to skip the entire test suite of the device is not available.

Give me some time to check this implementation with some dry runs and understand the use case that you have described so I can provide better inputs. I will also explore the part of skipping the tests in case the driver is not initialized.

@denghj
Copy link
Author

denghj commented Jun 19, 2018

Thanks Kulin, I will also try to find a better way to exit the suite gracefully, will get back to you later this week.
Once I will come up with an idea, will reach out and have a webex session to talk it through.
Good day!

if driver_availability_check=yes is set in applications.properties
then invoke this checkup
if driver_availability_check is not set, or set to anything but yes,
then ignore the checkup
@denghj
Copy link
Author

denghj commented Jun 21, 2018

From: David Reed davidre@perfectomobile.com
Date: Monday, June 18, 2018 at 1:23 PM
To: Jack Deng jackd@perfectomobile.com
Cc: PSGroup PSGroup@perfectomobile.com
Subject: Re: Eliminate the Device In Use errors from the digital Zoom Report

Jack, I'm curious about how this practice eliminates the install time from the equation. A new build of an app still requires installation at some point. Are they just lacking the concept of test suite?

Also, now, if the driver fails to initialize, what happens to the rest of the intended execution? Is it not an actual failure?

This seems more like something that belongs above the individual test execution level, probably at the test suite level or in the orchestration engine, like Jenkins, or even higher.

This change would seem to introduce a lot more invisible fragility in the test suite, since individual tests are now failing to launch entirely just because they're poorly written.

Wouldn't it be better to configure this as a suite dependency option? Connection sharing for a suite would also achieve the goal of reducing reinstallation time, no?

David Reed
davidre@perfectomobile.com

@kulin24
Copy link
Contributor

kulin24 commented Jun 29, 2018

Hi Jack,

Sorry for the delay.

I think we can add this code.

Just a quick question, will all the test scenarios show as failed if the device is not available?
I assume it will happen approximately in the first 1 min right?

Do you think we should try for the device to be available for some time some sort of device availability timeout?

@denghj
Copy link
Author

denghj commented Jul 1, 2018

Hi Kulin, yes it will retry several times before reaching the driver launch time limit, then will give up the driver launch and therefore fail the rest tests which rely on the driver.

I suggest to hold for this pull request , I plan to add some built in tests to test the RestApi features every time it gets build.
I will reach out to you when the test code and done and committed to the branch.

Thanks for taking time review the changes:)

2. Added LoadCert() to RestAPIUtils to over come the building
slaves/Agents which does not have proper Perfecto.com cert
3. Added a keystore to resources folder to allow loadcert to activate
Perfecto.com cert to the httpclient to use when sending http requests to
perfecto RestApis
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.

4 participants