Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8158b478
Unverified
Commit
8158b478
authored
Mar 31, 2021
by
Jia Hao
Committed by
GitHub
Mar 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for integration tests to devicelab (#79258)
parent
9bbe89d8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
0 deletions
+88
-0
integration_test_test.dart
dev/devicelab/bin/tasks/integration_test_test.dart
+12
-0
integration_test_test_ios.dart
dev/devicelab/bin/tasks/integration_test_test_ios.dart
+12
-0
integration_tests.dart
dev/devicelab/lib/tasks/integration_tests.dart
+33
-0
integration_test.dart
...tegration_tests/ui/integration_test/integration_test.dart
+17
-0
pubspec.yaml
dev/integration_tests/ui/pubspec.yaml
+2
-0
prod_builders.json
dev/prod_builders.json
+12
-0
No files found.
dev/devicelab/bin/tasks/integration_test_test.dart
0 → 100644
View file @
8158b478
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createEndToEndIntegrationTest
());
}
dev/devicelab/bin/tasks/integration_test_test_ios.dart
0 → 100644
View file @
8158b478
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createEndToEndIntegrationTest
());
}
dev/devicelab/lib/tasks/integration_tests.dart
View file @
8158b478
...
...
@@ -124,6 +124,13 @@ TaskFunction dartDefinesTask() {
);
}
TaskFunction
createEndToEndIntegrationTest
(
)
{
return
IntegrationTest
(
'
${flutterDirectory.path}
/dev/integration_tests/ui'
,
'integration_test/integration_test.dart'
,
);
}
class
DriverTest
{
DriverTest
(
this
.
testDirectory
,
...
...
@@ -162,3 +169,29 @@ class DriverTest {
});
}
}
class
IntegrationTest
{
IntegrationTest
(
this
.
testDirectory
,
this
.
testTarget
);
final
String
testDirectory
;
final
String
testTarget
;
Future
<
TaskResult
>
call
()
{
return
inDirectory
<
TaskResult
>(
testDirectory
,
()
async
{
final
Device
device
=
await
devices
.
workingDevice
;
await
device
.
unlock
();
final
String
deviceId
=
device
.
deviceId
;
await
flutter
(
'packages'
,
options:
<
String
>[
'get'
]);
final
List
<
String
>
options
=
<
String
>[
'-v'
,
'-d'
,
deviceId
,
testTarget
,
];
await
flutter
(
'test'
,
options:
options
);
return
TaskResult
.
success
(
null
);
});
}
}
dev/integration_tests/ui/integration_test/integration_test.dart
0 → 100644
View file @
8158b478
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_test/flutter_test.dart'
;
import
'package:integration_ui/build_mode.dart'
as
app
;
void
main
(
)
{
group
(
'Integration Test'
,
()
{
testWidgets
(
'smoke test'
,
(
WidgetTester
tester
)
async
{
app
.
main
();
await
tester
.
pumpAndSettle
();
expect
(
find
.
text
(
'Hello, world!'
),
findsOneWidget
);
});
});
}
dev/integration_tests/ui/pubspec.yaml
View file @
8158b478
...
...
@@ -13,6 +13,8 @@ dependencies:
sdk
:
flutter
flutter_driver
:
sdk
:
flutter
integration_test
:
sdk
:
flutter
test
:
1.16.5
_fe_analyzer_shared
:
19.0.0
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
...
...
dev/prod_builders.json
View file @
8158b478
...
...
@@ -726,6 +726,12 @@
"task_name"
:
"mac_android_integration_ui_textfield"
,
"flaky"
:
false
},
{
"name"
:
"Mac_android integration_test_test"
,
"repo"
:
"flutter"
,
"task_name"
:
"mac_android_integration_test_test"
,
"flaky"
:
false
},
{
"name"
:
"Mac_android microbenchmarks"
,
"repo"
:
"flutter"
,
...
...
@@ -1062,6 +1068,12 @@
"task_name"
:
"mac_ios_integration_ui_ios_textfield"
,
"flaky"
:
false
},
{
"name"
:
"Mac_ios integration_test_test_ios"
,
"repo"
:
"flutter"
,
"task_name"
:
"mac_ios_integration_test_test_ios"
,
"flaky"
:
false
},
{
"name"
:
"Mac_ios ios_app_with_extensions_test"
,
"repo"
:
"flutter"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment