Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
saikrishna321 committed Jun 19, 2024
1 parent ad0fffd commit bc5eb07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 70 deletions.
70 changes: 1 addition & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1 @@
## Setup:

1. Clone the repository
2. Create new flutter application or clone any exiting flutter application
3. Add below dependency in pubspec.yaml file of the flutter application

```
dev_dependencies:
appium_flutter_server:
path: /Users/sselvarj/Documents/git/personal/appium_flutter_server
```

NOTE: Update the path with cloned driver repository

4. create a new folder `integration_test` and create a new file `appium_server.dart` with below content

```
import 'package:appium_flutter_server/appium_flutter_server.dart';
import 'package:counter_app/main.dart';
void main() async {
initializeTest(app: const MyApp());
}
```

5. run `flutter build apk`
6. run `./gradlew app:assembleDebug -Ptarget=/Users/sselvarj/Documents/git/personal/flutter-learnings/counter_app/integration_test/appium_server.dart` (Replace the path)
7. It will now generate a debug apk under `build/app/outputs/apk/debug/app-debug.apk`
8. Start appium server with uiautomator2 driver with below capabilities

```
{
"capabilities": {
"alwaysMatch": {
"platformName": "Android",
"appium:orientation": "PORTRAIT",
"appium:automationName": "uiautomator2",
"appium:app": "/Users/sselvarj/Documents/git/personal/flutter-learnings/counter_app/build/app/outputs/apk/debug/app-debug.apk",
"appium:newCommandTimeout": 240,
"appium:intercept": true,
"appium:noReset": false,
"appium:fullReset": true
},
"firstMatch": [
{}
]
},
"desiredCapabilities": {
"platformName": "Android",
"appium:orientation": "PORTRAIT",
"appium:automationName": "uiautomator2",
"appium:app": "/Users/sselvarj/Documents/git/personal/flutter-learnings/counter_app/build/app/outputs/apk/debug/app-debug.apk",
"appium:newCommandTimeout": 240,
"appium:intercept": true,
"appium:noReset": false,
"appium:fullReset": true
}
}
```

9. adb forward tcp:8080 tcp:8888
10. From the browser hit `http://localhost:8080/tap` and it should click the counter (+) icon from the app
11. From the browser hit `http://localhost:8080/screenshot` and it will return base64 screenshot image

## Ios simulator

1. flutter build ios integration_test/appium_server.dart --simulator
2. App path `flutter-learnings/counter_app/build/ios/iphonesimulator/Runner.app`
3. Simulator logs `xcrun simctl spawn booted log stream | grep flutter`
### For Usage please refer https://github.com/AppiumTestDistribution/appium-flutter-integration-driver?tab=readme-ov-file#how-to-use-appium-flutter-integration-driver
2 changes: 1 addition & 1 deletion server/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: appium_flutter_server
description: "Appium Flutter server using Integration Test package for testing Flutter apps with Appium"
version: 0.0.8
version: 0.0.9
homepage: "https://github.com/AppiumTestDistribution/appium-flutter-server"

environment:
Expand Down

0 comments on commit bc5eb07

Please sign in to comment.