Skip to content

Instantly share code, notes, and snippets.

View adityadroid's full-sized avatar
🎯
Fluttering around.

Aditya Gurjar adityadroid

🎯
Fluttering around.
View GitHub Profile
cd android
./gradlew app:connectedAndroidTest -Ptarget=`pwd`/../integration_test/main_integration_test.dart
android {
...
defaultConfig {
...
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
}
dependencies {
testImplementation 'junit:junit:4.12'
package me.adityadroid.bitrise.example.flutter_bitrise_integration_test_automation;
import androidx.test.rule.ActivityTestRule;
import dev.flutter.plugins.integration_test.FlutterTestRunner;
import org.junit.Rule;
import org.junit.runner.RunWith;
import me.adityadroid.bitrise.example.flutter_bitrise_integration_test_automation.MainActivity;
@RunWith(FlutterTestRunner.class)
public class MainActivityTest {
firebase-test-lab-run:
steps:
- activate-ssh-key@4: {}
- git-clone@8: {}
- flutter-installer@0:
inputs:
- version: 3.3.10
- is_update: 'false'
- [email protected]:
title: Accept android licenses
---
format_version: '11'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: flutter
workflows:
integration-test-app:
description: 'This workflow runs the projects integration tests located at integration_test/
directory
'
dev_dependencies:
integration_test:
sdk: flutter
flutter_test:
sdk: flutter
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:flutter_bitrise_integration_test_automation/main.dart' as app;
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
testWidgets('Test counter app', (WidgetTester tester) async {
app.main();
@adityadroid
adityadroid / test_driver.sh
Created February 22, 2020 20:45
Script to bypass permissions on Flutter Driver Tests - iOS
echo "Shutting down all existing emulators..."
xcrun simctl shutdown all
echo "Recreating the emulator..."
xcrun simctl delete iOS13TestDevice || echo Failed to delete iOS 13 device
xcrun simctl create iOS13TestDevice "iPhone 11" com.apple.CoreSimulator.SimRuntime.iOS-13-3
echo "Booting..."
xcrun simctl boot iOS13TestDevice
echo "Checking boot status..."
xcrun simctl bootstatus iOS13TestDevice
echo "Running driver tests..."
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{document=**} {
//Allow creating a new user to anyone who is authenticated
allow create: if isSignedIn();
//Allow read if signed in
allow read: if isSignedIn();
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{document=**} {
//Allow creating a new user to anyone who is authenticated
allow create: if isSignedIn();
//Allow read if signed in
allow read: if isSignedIn();