Skip to content

[native_doc_dartifier] Add initial framework for End-to-End tests #2383

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

marshelino-maged
Copy link
Contributor

Replaces #2379, which was closed due to fork deletion by mistake.
Related to: #2343

End-to-End (E2E) testing workflow that validates Dartified Java code against expected Java behavior.

Java source files located in: dartify_simple_cases/java/com/...
Java snippet definitions in: dartify_simple_cases/java_snippets.dart

Tool: tool/prepare_dartify_test.dart that needs to be run before flutter test

  • Generate JNI bindings for the Java package
  • Compile Java files
  • Dartify Java snippets
  • Save output to: dartify_simple_cases/dartified_snippets/...

A runtime Dart test: test/runtime_test.dart
This verifies that the Dartified output matches the expected Java result (not running the Java snippet yet, but assuming we know the result).


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.

@github-actions github-actions bot added type-infra A repository infrastructure change or enhancement package:native_doc_dartifier labels Jul 3, 2025
@marshelino-maged
Copy link
Contributor Author

marshelino-maged commented Jul 3, 2025

We have added the GEMINI_API_KEY now but the CI still fails, can you please investigate @marshelino-maged?

@HosseinYousefi, I see the error in the CI run is about the GEMINI_API_KEY.

Method doesn't allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.

When trying with my API key on my fork, I pass all the tests and can't reproduce that error.

Copy link

github-actions bot commented Jul 3, 2025

PR Health

Changelog Entry
Package Changed Files
package:native_doc_dartifier pkgs/native_doc_dartifier/pubspec.yaml

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols
License Headers ✔️
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/jni/lib/src/third_party/generated_bindings.dart
pkgs/native_doc_dartifier/lib/native_doc_dartifier.dart
pkgs/native_doc_dartifier/lib/src/native_doc_dartifier_base.dart
pkgs/objective_c/lib/src/ns_input_stream.dart

@HosseinYousefi
Copy link
Member

When trying with my API key on my fork, I pass all the tests and can't reproduce that error.

@athomas Could you please double check that the GEMINI_API_KEY is indeed a secret in this repo?

@marshelino-maged marshelino-maged changed the title [native_doc_dartifier] Add initial framework for End-to-End tests [native_doc_dartifier] Add initial framework for End-to-End tests Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:native_doc_dartifier type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants