Skip to content

Comments

[plugin-mobile-app] Add steps to terminate and reinstall application#2092

Merged
valfirst merged 14 commits intovividus-framework:masterfrom
VerkhovtsovPavel:mobile-app-add-steps-for-terminate-and-restart-application
Nov 8, 2021
Merged

[plugin-mobile-app] Add steps to terminate and reinstall application#2092
valfirst merged 14 commits intovividus-framework:masterfrom
VerkhovtsovPavel:mobile-app-add-steps-for-terminate-and-restart-application

Conversation

@VerkhovtsovPavel
Copy link
Contributor

Closes #2073

@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #2092 (f227d50) into master (0307563) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2092      +/-   ##
============================================
+ Coverage     96.20%   96.21%   +0.01%     
- Complexity     5347     5368      +21     
============================================
  Files           756      757       +1     
  Lines         15271    15338      +67     
  Branches       1028     1032       +4     
============================================
+ Hits          14692    14758      +66     
  Misses          450      450              
- Partials        129      130       +1     
Impacted Files Coverage Δ
.../vividus/bdd/mobileapp/steps/ApplicationSteps.java 100.00% <100.00%> (ø)
...g/vividus/mobileapp/action/ApplicationActions.java 100.00% <100.00%> (ø)
...org/vividus/bdd/mobileapp/steps/KeyboardSteps.java 98.46% <0.00%> (-1.54%) ⬇️
.../src/main/java/org/vividus/util/ResourceUtils.java 100.00% <0.00%> (ø)
...in/java/org/vividus/bdd/steps/ExecutableSteps.java 100.00% <0.00%> (ø)
...org/vividus/configuration/PropertiesDecryptor.java 100.00% <0.00%> (ø)
.../main/java/org/vividus/proxy/steps/ProxySteps.java 100.00% <0.00%> (ø)
...in/java/org/vividus/bdd/model/RequestPartType.java 100.00% <0.00%> (ø)
...n/java/org/vividus/bdd/steps/ui/web/WaitSteps.java 100.00% <0.00%> (ø)
...n/java/org/vividus/selenium/TimeoutConfigurer.java 100.00% <0.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0307563...f227d50. Read the comment docs.

@VerkhovtsovPavel VerkhovtsovPavel marked this pull request as ready for review October 20, 2021 09:43
@VerkhovtsovPavel VerkhovtsovPavel force-pushed the mobile-app-add-steps-for-terminate-and-restart-application branch from b772291 to 15da352 Compare October 29, 2021 11:25
@valfirst
Copy link
Collaborator

appium/appium#15807 👀


[source,gherkin]
----
When I reinstall mobile application using bundle identifier `$bundleId`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
When I reinstall mobile application using bundle identifier `$bundleId`
When I reinstall mobile application with bundle identifier `$bundleId`

|fullReset|true |

----
steps pair is ability to avoid device re-allocation on SauceLabs or BrowserStack in case of application re-installation within story run (e.g. in case usage ExamplesTable)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
steps pair is ability to avoid device re-allocation on SauceLabs or BrowserStack in case of application re-installation within story run (e.g. in case usage ExamplesTable)
steps pair is ability to avoid device re-allocation on SauceLabs or BrowserStack in case of application re-installation within story run.


[source,gherkin]
----
When I reinstall mobile application using bundle identifier `$bundleId`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add a description for $bundleId parameter



Scenario: Verify step: 'When I restart mobile application'
When I restart mobile application
Copy link
Collaborator

Choose a reason for hiding this comment

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

This test needs to be updated

HasCapabilities hasCapabilities = webDriverProvider.getUnwrapped(HasCapabilities.class);
String appPath = hasCapabilities.getCapabilities().getCapability("app").toString();
Validate.isTrue(interactor.removeApp(bundleId),
"Application with the bundle identifier '%s' hasn't been successfully removed", bundleId);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe something simpler like "Unable to remove mobille application with the bundle identifier '%s'"

|app |${app-url}|


Scenario: Verify step: 'When I restart mobile application'
Copy link
Member

Choose a reason for hiding this comment

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

please add requirement id for added scenarios


Remove a mobile application from device and install it again

==== *_Parameters_*
Copy link
Collaborator

Choose a reason for hiding this comment

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

this section should go after Wording

@valfirst valfirst changed the title [plugin-mobile-app] Add steps for terminate and restart application [plugin-mobile-app] Add steps to terminate and reinstall application Nov 4, 2021
"Application with the bundle identifier '%s' is not installed or not running on the device",
bundleId);
Validate.isTrue(interactor.terminateApp(bundleId),
"Application with the bundle identifier '%s' hasn't been successfully terminated", bundleId);
Copy link
Member

Choose a reason for hiding this comment

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

"Unable to terminated mobile application with the bundle identifier '%s'" to follow common pattern?

}

/**
* Restart mobile application
Copy link
Member

Choose a reason for hiding this comment

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

Steps wording mentions reinstall, javadoc says about restart, looks confusing for the end user

Scenario: Verify step: 'When I reinstall mobile application with bundle identifier `$bundleId`'
Meta:
@requirementId 2073
When I reinstall mobile application with bundle identifier `${main-app}`
Copy link
Member

Choose a reason for hiding this comment

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

No validations here?

Copy link
Member

Choose a reason for hiding this comment

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

For example, you could open some view, validate it opened, and then reinstall. In the current implementation of the test, if step does nothing at all we won't get any error

Co-authored-by: Ivan Kalinin <ivan_kalinin1@epam.com>
@valfirst valfirst merged commit b2ee00d into vividus-framework:master Nov 8, 2021
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.

[Mobile] Add steps to terminate and activate the app

4 participants