Class: Ace::Test::EndToEndRunner::CLI::Commands::RunSuite
- Inherits:
-
Support::Cli::Command
- Object
- Support::Cli::Command
- Ace::Test::EndToEndRunner::CLI::Commands::RunSuite
- Includes:
- Support::Cli::Base
- Defined in:
- lib/ace/test/end_to_end_runner/cli/commands/run_suite.rb
Overview
CLI command for running E2E test suite across all packages
Discovers all E2E tests in the monorepo and executes them with optional parallel execution and affected package filtering.
Instance Method Summary collapse
Instance Method Details
#call(packages: nil, **options) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/ace/test/end_to_end_runner/cli/commands/run_suite.rb', line 68 def call(packages: nil, **) = coerce_types(, parallel: :integer, timeout: :integer) parallel = [:parallel] affected = [:affected] only_failures = [:only_failures] = parse_csv_list([:tags]) = parse_csv_list([:exclude_tags]) output = quiet?() ? StringIO.new : $stdout progress = [:progress] && !quiet?() orchestrator = Organisms::SuiteOrchestrator.new( max_parallel: [parallel, 1].max, output: output, progress: progress ) results = orchestrator.run( parallel: parallel > 0, affected: affected, only_failures: only_failures, packages: packages, cli_args: [:cli_args], provider: [:provider], timeout: [:timeout], tags: , exclude_tags: , verify: [:verify] ) if results[:total].zero? if only_failures raise Ace::Support::Cli::Error.new( "No failed test scenarios found in cache" ) else raise Ace::Support::Cli::Error.new("No tests found to run") end end # Exit with error if any test failed if results[:failed] > 0 || results[:errors] > 0 failed_count = results[:failed] + results[:errors] raise Ace::Support::Cli::Error.new( "#{failed_count} test(s) failed or errored" ) end end |