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
48287750
Unverified
Commit
48287750
authored
Aug 19, 2020
by
Ming Lyu (CareF)
Committed by
GitHub
Aug 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove duplicate e2e driver (#64015)
parent
d504437d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
48 deletions
+8
-48
e2e_test.dart
dev/benchmarks/macrobenchmarks/test_driver/e2e_test.dart
+8
-48
No files found.
dev/benchmarks/macrobenchmarks/test_driver/e2e_test.dart
View file @
48287750
...
...
@@ -3,55 +3,15 @@
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'package:e2e/common.dart'
as
e2e
;
import
'package:flutter_driver/flutter_driver.dart'
;
import
'package:e2e/e2e_driver.dart'
as
driver
;
import
'package:path/path.dart'
as
path
;
const
JsonEncoder
_prettyEncoder
=
JsonEncoder
.
withIndent
(
' '
);
/// Flutter Driver test output directory.
///
/// Tests should write any output files to this directory. Defaults to the path
/// set in the FLUTTER_TEST_OUTPUTS_DIR environment variable, or `build` if
/// unset.
String
testOutputsDirectory
=
Platform
.
environment
[
'FLUTTER_TEST_OUTPUTS_DIR'
]
??
'build'
;
String
testOutputFilename
=
'e2e_perf_summary'
;
Future
<
void
>
main
()
async
{
final
FlutterDriver
driver
=
await
FlutterDriver
.
connect
();
final
String
jsonResult
=
await
driver
.
requestData
(
null
,
timeout:
const
Duration
(
minutes:
1
));
final
e2e
.
Response
response
=
e2e
.
Response
.
fromJson
(
jsonResult
);
await
driver
.
close
();
if
(
response
.
allTestsPassed
)
{
print
(
'All tests passed.'
);
await
fs
.
directory
(
testOutputsDirectory
).
create
(
recursive:
true
);
final
File
file
=
fs
.
file
(
path
.
join
(
testOutputsDirectory
,
'
$testOutputFilename
.json'
));
final
String
resultString
=
_encodeJson
(
response
.
data
[
'performance'
]
as
Map
<
String
,
dynamic
>,
true
,
Future
<
void
>
main
()
=>
driver
.
e2eDriver
(
timeout:
const
Duration
(
minutes:
5
),
responseDataCallback:
(
Map
<
String
,
dynamic
>
data
)
async
{
await
driver
.
writeResponseData
(
data
[
'performance'
]
as
Map
<
String
,
dynamic
>,
testOutputFilename:
'e2e_perf_summary'
,
);
await
file
.
writeAsString
(
resultString
);
exit
(
0
);
}
else
{
print
(
'Failure Details:
\n
${response.formattedFailureDetails}
'
);
exit
(
1
);
}
}
String
_encodeJson
(
Map
<
String
,
dynamic
>
jsonObject
,
bool
pretty
)
{
return
pretty
?
_prettyEncoder
.
convert
(
jsonObject
)
:
json
.
encode
(
jsonObject
);
}
);
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