Open raulsorrentino opened 4 days ago
Hello, thanks for the PR and for the hard work. How are this test being executed?
Hello, thank you for the kind words! Here's a quick guide on how to execute these tests:
Appium Server:
Install Appium and UiAutomator2 Driver.
Make sure the Appium server is running. You can start the server by typing appium
in the terminal.
Driver Configuration:
Update the Constants
class to match your setup:
public class Constants {
public static final String PLATFORM_NAME = "Android";
public static final String PLATFORM_VERSION = "15"; // Adjust to your device/emulator version
public static final String UDID = "your-device-id"; // Replace with your device/emulator ID
public static final String APP_PACKAGE = "com.github.emavgl.piggybankpro";
public static final String APP_PATH = "/path/to/your/apk/app-pro-debug.apk"; // Update with the APK location
public static final String APPIUM_SERVER_URL = "http://127.0.0.1:4723"; // Appium server URL
}
Device/Emulator:
Connect a device or start an emulator that matches the configuration specified in the Constants
class.
Test Execution:
You can run the tests either directly from your IDE (by selecting the test class or method and pressing the run button) or by using Gradle.
Let me know if you need further clarification!
This pull request implements the proposal from issue #162 to add test automation using Appium. Previously, the project did not include any automated UI tests, and this PR introduces the necessary setup to integrate Appium into the project.
Key Features Added
Appium Configuration:
Updates to Dart Code:
Page Object Model (POM) Implementation:
Tests Added
Record Management:
addExpenseRecord
: Tests adding and retrieving an expense record.addIncomeRecord
: Tests adding and retrieving an income record.deleteRecord
: Verifies that a record can be deleted successfully.Record Visibility by Date Range:
shouldDisplayRecordsForSelectedMonthOnly
: Verifies that only records from the selected month are displayed.shouldDisplayRecordsForSelectedYearOnly
: Verifies that only records from the selected year are visible.shouldDisplayRecordsForCustomDateRangeOnly
: Verifies that only records within a custom date range are shown.Date Range Filters:
shouldDisplayCorrectTextForSelectedMonth
: Ensures that the correct date range text is displayed for the selected month.shouldDisplayCorrectTextForSelectedYear
: Ensures that the correct date range text is shown for the selected year.shouldDisplayCorrectTextForCustomDateRange
: Ensures that the correct date range text is displayed for a custom date range.Improvements and Refactoring
@BeforeSuite
and@AfterSuite
setup for efficiency.Limitations
Not all components of the app are covered by tests at this stage. Additional tests will be added in the future to increase test coverage, focusing on critical app components and functionality.
Fixes #162