Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting #81

Open
wants to merge 91 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
c6f58a5
Added reporting
mmcc007 Nov 17, 2019
573f838
Merge branch 'master' into reporting
mmcc007 Nov 17, 2019
8f11b50
Removed local dependency on report package
mmcc007 Nov 18, 2019
c0c24e2
Refactored reporting into separate package
mmcc007 Nov 18, 2019
798ed2d
Deleted unused reporting tests
mmcc007 Nov 18, 2019
9af3392
Minor fix
mmcc007 Nov 18, 2019
a4fd240
Removed user messages from context
mmcc007 Nov 18, 2019
de35adc
Added runner tests
mmcc007 Nov 18, 2019
b32c820
Enabled process record/replay
mmcc007 Nov 18, 2019
182e7b5
Fixed default case ('all' devices)
mmcc007 Nov 18, 2019
1ace197
Removed unused command alias
mmcc007 Nov 18, 2019
d8a139c
Improved user messaging
mmcc007 Nov 19, 2019
7178f0b
Updated crash report config, added test
mmcc007 Nov 19, 2019
69a249f
Removed env dependencies to permit running in CI
mmcc007 Nov 19, 2019
cbee481
Skipped crash report test for sync command when running on CI
mmcc007 Nov 19, 2019
63d767c
Skipped crash report test for async command when running on CI
mmcc007 Nov 19, 2019
84bd5cd
Added cirrus build for unit tests
mmcc007 Nov 19, 2019
d7b7fe0
Added pubspec.lock to lock packages during build
mmcc007 Nov 19, 2019
16ac6f2
Added .packages to lock packages during build (avoids pub get)
mmcc007 Nov 19, 2019
ff23a73
Added call to get dependencies before running tests
mmcc007 Nov 19, 2019
875507e
Skipped url override test on CI
mmcc007 Nov 19, 2019
0f6365b
Added option to run a single test file
mmcc007 Nov 20, 2019
f63fda5
Added test for sylph command runner
mmcc007 Nov 20, 2019
a866589
Switched to fake usage
mmcc007 Nov 20, 2019
179b98c
Switched to FakeUsage and re-enabled one test on CI
mmcc007 Nov 20, 2019
595bfc6
Matched part of logger output
mmcc007 Nov 20, 2019
19ecfc7
Fixed test for config command
mmcc007 Nov 20, 2019
630359c
Fixed test
mmcc007 Nov 20, 2019
438ba78
Moved utils
mmcc007 Nov 20, 2019
cef8693
Added-back tests on CI
mmcc007 Nov 20, 2019
39847a5
Added devices command test
mmcc007 Nov 20, 2019
6e1fe86
Fixed test
mmcc007 Nov 20, 2019
9560c0a
Removed test from CI
mmcc007 Nov 20, 2019
50d5de8
Added more devices tests
mmcc007 Nov 20, 2019
98a4f67
Minor mod to a devices test
mmcc007 Nov 20, 2019
405d7aa
Merge branch 'master' into reporting
mmcc007 Nov 20, 2019
3e7f7a3
Removed .packages
mmcc007 Nov 20, 2019
4f1f7a0
Fixed analyzer warnings
mmcc007 Nov 20, 2019
293001d
Cleaned-up
mmcc007 Nov 20, 2019
c053e2e
Refactored device farm calls into a class and added to context
mmcc007 Nov 20, 2019
75ea1a0
Moved consts into DeviceFarm
mmcc007 Nov 20, 2019
de59f6e
Made consts private to DeviceFarm
mmcc007 Nov 20, 2019
4332b6c
Added bundle to context
mmcc007 Nov 20, 2019
ed84cbd
Fixed test
mmcc007 Nov 21, 2019
2ee3d2b
Added test for run command and fixed bundle test
mmcc007 Nov 21, 2019
d575077
Removed dependency on local env
mmcc007 Nov 21, 2019
2f03d4d
Removed verify calls
mmcc007 Nov 21, 2019
81eedb1
Added basic version checking
mmcc007 Nov 21, 2019
466e84a
Changed messaging
mmcc007 Nov 21, 2019
960207f
Moved Cache to version.dart
mmcc007 Nov 21, 2019
ebd1637
Used settings file to store version stamp
mmcc007 Nov 22, 2019
08c09ef
Removed channels and merged cache tests with version tests
mmcc007 Nov 22, 2019
7c7ec9f
Re-imported from flutter_tools (without formatting)
mmcc007 Nov 23, 2019
402a745
Moved to tool_base
mmcc007 Nov 23, 2019
fb6b93f
Added cache, version and user messages
mmcc007 Nov 23, 2019
78f9389
Re-imported from flutter_tools (without formatting)
mmcc007 Nov 24, 2019
d7f4840
Corrected messaging
mmcc007 Nov 24, 2019
c41435d
Integrated with location independent cache
mmcc007 Nov 24, 2019
38464a7
Changed lookup of local/remote version date with settings/pub server
mmcc007 Nov 25, 2019
c9df770
Added ToolVersion to context
mmcc007 Nov 25, 2019
6cd032d
Added extension to settings file
mmcc007 Nov 25, 2019
feb95e0
Added mock ToolVersion to test
mmcc007 Nov 25, 2019
295d3ac
Re-imported from flutter_tools (without formatting)
mmcc007 Nov 25, 2019
0437fe2
Skipped 2 tests
mmcc007 Nov 25, 2019
6f5ca7f
Set version number of installed pub app
mmcc007 Nov 26, 2019
9326f9c
Removed methods in version no longer used
mmcc007 Nov 26, 2019
4da1635
Removed unused code in test
mmcc007 Nov 26, 2019
7c3d6a2
Resolved location of files to work with version
mmcc007 Dec 1, 2019
264883a
Fixed test
mmcc007 Dec 1, 2019
481d736
Fixed test
mmcc007 Dec 1, 2019
1b659ad
Fixed test
mmcc007 Dec 1, 2019
606a0dc
Fixed test
mmcc007 Dec 1, 2019
a31d1a3
Fixed test
mmcc007 Dec 1, 2019
24b131a
Removed skipping test on CI
mmcc007 Dec 1, 2019
6bf7d00
Removed duplicate mocks
mmcc007 Dec 1, 2019
987e6f1
Fixed test
mmcc007 Dec 1, 2019
00c5e14
Fixed test
mmcc007 Dec 1, 2019
b80a3f9
Cleanup test
mmcc007 Dec 1, 2019
e9c0774
Upgraded dependencies
mmcc007 Dec 2, 2019
4ec6a53
Pinned version of coverage tool
mmcc007 Dec 2, 2019
9501082
Get packages before running tests
mmcc007 Dec 2, 2019
0d4fd47
Isolated env for CI
mmcc007 Dec 2, 2019
d5df959
Pinned dart version to 2.5.0
mmcc007 Dec 2, 2019
5f688bb
Set FLUTTER_ROOT
mmcc007 Dec 2, 2019
80e5316
Removed unnecessary test
mmcc007 Dec 2, 2019
ded4efe
Fixed typo
mmcc007 Dec 2, 2019
6b9e50e
Removed unused code and improved messaging
mmcc007 Dec 2, 2019
9a6028a
Fixed analyzer warnings
mmcc007 Dec 2, 2019
a3f78fd
Fixed test
mmcc007 Dec 2, 2019
2bfbd62
Updated README
mmcc007 Dec 2, 2019
e00aae8
Improve messaging
mmcc007 Dec 2, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
container:
image: cirrusci/flutter:latest

test_task:
pub_cache:
folder: ~/.pub-cache
test_script:
- pub get
- pub run test test/all_tests.dart
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,21 @@ jobs:
include:
- stage: Run tests
env: Run Tests
language: dart
dart: stable
# language: dart
# dart: stable
os: linux
before_script: # exits build if tests fail
- DART_VERSION=2.5.0 # for unit tests
- curl --connect-timeout 15 --retry 5 https://storage.googleapis.com/dart-archive/channels/stable/release/$DART_VERSION/sdk/dartsdk-linux-x64-release.zip > ${TRAVIS_HOME}/dartsdk.zip
- unzip ${TRAVIS_HOME}/dartsdk.zip -d ${TRAVIS_HOME} > /dev/null
- rm ${TRAVIS_HOME}/dartsdk.zip
- export DART_SDK="${TRAVIS_HOME}/dart-sdk"
- export PATH="$DART_SDK/bin:$PATH"
- export PATH="${TRAVIS_HOME}/.pub-cache/bin:$PATH"
- pub get
- export FLUTTER_ROOT='/'
- pub run test test/all_tests.dart
- pub global activate coverage
- pub global activate coverage 0.13.3
script:
- script/code_coverage.sh
after_success: bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info
Expand Down
30 changes: 7 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![pub package](https://img.shields.io/pub/v/sylph.svg)](https://pub.dartlang.org/packages/sylph)
[![Build Status](https://travis-ci.com/mmcc007/sylph.svg?branch=master)](https://travis-ci.com/mmcc007/sylph)
[![Build status](https://ci.appveyor.com/api/projects/status/ua5hg82feg6aabsd/branch/master?svg=true)](https://ci.appveyor.com/project/mmcc007/sylph/branch/master)
[![Build Status](https://api.cirrus-ci.com/github/mmcc007/sylph.svg)](https://cirrus-ci.com/github/mmcc007/sylph)
[![codecov](https://codecov.io/gh/mmcc007/sylph/branch/master/graph/badge.svg)](https://codecov.io/gh/mmcc007/sylph)

<a href="https://dlpng.com/png/3962939"><img src="art/sylph_logo.png" width="30%" title="Click for source" alt="Sylph"></a>
Expand All @@ -19,28 +20,13 @@ pub global activate sylph
```

# Usage
```bash
sylph devices # generates a list of real devices in cloud
sylph run # runs integration tests in cloud
```
sylph
```
or, if not using the default config file:
```
sylph -c <path to config file>
```

General usage:
```
usage: sylph [--help] [--config <config file>] [--devices <all|android|ios>] [--verbose]

sample usage: sylph

-c, --config=<sylph.yaml> Path to config file.
(defaults to "sylph.yaml")

-d, --devices=<all|android|ios> List devices available in cloud.
[all, android, ios]

-v, --verbose Noisy logging, including all shell commands executed.
-h, --help Display this help information.
or, if not using the default `sylph.yaml` config file:
```bash
sylph run -c <name of config file>
```

# Dependencies
Expand Down Expand Up @@ -239,5 +225,3 @@ https://ci.appveyor.com/project/mmcc007/sylph
When contributing to this repository, please feel free to discuss via issue or pull request.

[Issues](https://github.com/mmcc007/screenshots/issues) and [pull requests](https://github.com/mmcc007/screenshots/pulls) are welcome.

Your feedback is used to guide where development effort is focused. So feel free to create as many issues and pull requests as you want. You should expect a timely and considered response.
6 changes: 3 additions & 3 deletions bin/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ Future run() async {
if (devicesArgVal != null) {
switch (devicesArgVal) {
case 'all':
printDeviceFarmDevices(getDeviceFarmDevices());
printDeviceFarmDevices(df.getDeviceFarmDevices());
break;
case 'android':
printDeviceFarmDevices(getDeviceFarmDevicesByType(DeviceType.android));
printDeviceFarmDevices(df.getDeviceFarmDevicesByType(DeviceType.android));
break;
case 'ios':
printDeviceFarmDevices(getDeviceFarmDevicesByType(DeviceType.ios));
printDeviceFarmDevices(df.getDeviceFarmDevicesByType(DeviceType.ios));
break;
}
exit(0);
Expand Down
9 changes: 9 additions & 0 deletions bin/sylph_tool.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2015 The Chromium 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:sylph/executable.dart' as executable;

void main(List<String> args) {
executable.main(args);
}
48 changes: 48 additions & 0 deletions lib/executable.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Copyright 2015 The Chromium 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 'dart:async';

import 'package:sylph/src/commands/run.dart';

import 'runner.dart' as runner;

import 'src/base/runner/sylph_command.dart';
import 'src/commands/config.dart';
import 'src/commands/devices.dart';

/// Main entry point for commands.
///
/// This function is intended to be used from the `sylph` command line tool.
Future<void> main(List<String> args) async {
final bool verbose = args.contains('-v') || args.contains('--verbose');

final bool help = args.contains('-h') ||
args.contains('--help') ||
(args.isNotEmpty && args.first == 'help') ||
(args.length == 1 && verbose);
final bool muteCommandLogging = help;
final bool verboseHelp = help && verbose;

await runner.run(
args,
<SylphCommand>[
ConfigCommand(verboseHelp: verboseHelp),
DevicesCommand(),
RunCommand(verboseHelp: verboseHelp),
],
verbose: verbose,
muteCommandLogging: muteCommandLogging,
verboseHelp: verboseHelp,
// overrides: <Type, Generator>{
// // The build runner instance is not supported in google3 because
// // the build runner packages are not synced internally.
// CodeGenerator: () => const BuildRunner(),
// WebCompilationProxy: () => BuildRunnerWebCompilationProxy(),
// // The web runner is not supported internally because it depends
// // on dwds.
// WebRunnerFactory: () => DwdsWebRunnerFactory(),
// }
);
}
Loading