Git Product home page Git Product logo

trust-wallet's Introduction

Trust Wallet

The trust wallet appium test repo is provided to test the creation and addition of existing wallets (Scope is limited to multi-coin wallets). It also tests the management of cryptos on the app (show and remove crypto). Due to time the tests only cover the positive cases in an end to end manner using cucumber (BDD) This allows us for easy reusability and multiple permutations of the same tests.

Running Tests with Gradle

1. build project with gradle build

./gradlew build

2. Manually spin up an appium Server

3. Configure defaults.conf or override via environment variables and add apk to project (include correct path in conf)

4. Run all tests with the following command

./gradlew cucumberCli

Framework Structure

Configuration and Initialization

AppConfig: Located in the com.trustWallet.config package, this class is the heart of the Spring configuration. It declares beans for the AndroidDriver and FluentWait, ensuring they're appropriately managed and accessible throughout the framework. The @ComponentScan annotation is used to automatically detect and register page objects and other components defined within specified packages.

Core Components

DriverManager: This class is responsible for setting up and returning an instance of AndroidDriver, configured with the desired capabilities for the Appium server. It encapsulates the complexity of driver initialization, including setting up device configurations and app paths.

Page Objects

The framework employs the Page Object Model, where each page object class represents a screen in the Trust Wallet app. These classes are found under com.trustWallet.page and its subpackages. They contain methods that interact with the UI elements on their respective screens, making the tests more readable and maintainable.

Context Management

For Example

OnboardingScenario: This component, located in com.trustWallet.context, serves as a container for all page objects related to the onboarding process. It uses Spring's @Autowired annotation to inject the necessary page object dependencies. This class acts as a facade, providing a simplified interface for test scripts to interact with the onboarding flow.

Utility Classes

WidgetsPopUpsUtility: This utility class provides methods to handle common widgets and pop-ups that appear throughout the app, such as notifications or reset prompts. It's an example of how utility classes can abstract repetitive interactions, making them reusable across different test scenarios.

###Testing Flow The testing flow typically begins with the CucumberRunnerTest, which orchestrates the execution of Cucumber feature files. The step definition classes under com.trustWallet.steps translate these feature files into actions, utilizing the OnboardingScenario context and other page objects to interact with the app.

Spring Integration

Spring is utilized primarily for dependency injection, ensuring that each component, like page objects and utility classes, is instantiated and managed by the Spring container. This approach reduces boilerplate code for object creation and allows for more flexible test configurations.


trust-wallet's People

Contributors

olufemiadeolusile avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.