pushDeclaredPackageTestGroup function

String? pushDeclaredPackageTestGroup({
  1. required Object? description,
  2. required Object? skip,
  3. Uri? locationUri,
  4. StackTrace? stackTrace,
  5. List<String> ignoredLibrarySuffixes = const <String>[],
})

Pushes a group onto the declaration registry and returns its package path.

Callers must ensure the Allure runtime plugin is installed first. The declaration-time skip is tracked on the registry only — it is not forwarded to the framework group call, so nested tests still run and can self-skip while keeping setUp/tearDown intact.

Implementation

String? pushDeclaredPackageTestGroup({
  required Object? description,
  required Object? skip,
  Uri? locationUri,
  StackTrace? stackTrace,
  List<String> ignoredLibrarySuffixes = const <String>[],
}) {
  final packagePath = resolvePackageTestPathFromDeclaration(
    locationUri: locationUri,
    stackTrace: stackTrace,
    ignoredLibrarySuffixes: ignoredLibrarySuffixes,
  );
  PackageTestScopeRegistry.instance.pushGroup(
    description?.toString() ?? '',
    packagePath: packagePath,
    skipped: skip != null && skip != false,
  );
  return packagePath;
}