Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

800 B
Raw Blame
// A command-line driver; printing is its interface.
// ignore_for_file: avoid_print

import 'dart:io';

import 'package:integration_test/integration_test_driver_extended.dart';

/// Host side of `integration_test/first_task_test.dart`: writes each screenshot the app takes into
/// `HARNESS_JOURNEY_OUT` (default `build/journey/`), named `<step>-<HARNESS_PHONE>.png`.
Future<void> main() => integrationDriver(
  onScreenshot: (name, bytes, [args]) async {
    final root = Platform.environment['HARNESS_JOURNEY_OUT'] ?? 'build/journey';
    final phone = Platform.environment['HARNESS_PHONE'] ?? 'phone';
    final file = File('$root/$name-$phone.png');
    await file.parent.create(recursive: true);
    await file.writeAsBytes(bytes);
    print('[journey] $name-$phone');
    return true;
  },
);