Skip to content

test(e2e): add e2e tests#76

Draft
shabaraba wants to merge 9 commits intomasterfrom
test/add-e2e-test
Draft

test(e2e): add e2e tests#76
shabaraba wants to merge 9 commits intomasterfrom
test/add-e2e-test

Conversation

@shabaraba
Copy link
Member

@shabaraba shabaraba commented Feb 27, 2026

Why

This project needs end-to-end tests to verify the kintone Java client works correctly against a real kintone environment. Unit tests with mocks are valuable for testing internal logic, but they cannot catch issues with actual API integration, authentication flows, and real-world scenarios.

What

Added E2E Test Infrastructure

  • GitHub Actions workflow (.github/workflows/e2e.yml):

    • Runs on push to master and manual dispatch
    • Supports specifying individual test classes
    • Includes proxy and authenticated proxy test jobs
    • Publishes JUnit test reports
    • Concurrency control to prevent parallel E2E runs
  • Test environment setup (e2e-tests/):

    • Gradle-based standalone test project
    • Environment variable configuration for kintone credentials
    • Docker-based proxy server for proxy tests
    • Helper scripts for running tests and updating client JAR
  • Test coverage:

    • App API (settings, customize, ACL, fields, layout, views, reports, notifications, process management, actions)
    • Record API (CRUD, comments, cursor, bulk operations)
    • Space API (threads, members, body updates)
    • File API (upload/download)
    • Plugin API (install, uninstall, get apps)
    • Schema API (API list, schema retrieval)
    • Bulk Requests API

Pre-created App Approach

Tests use pre-created kintone resources instead of creating new apps for each test run. This approach:

  • Prevents accumulation of test apps that cannot be deleted via API
  • Enables consistent test execution in CI
  • Requires pre-configured test resources (apps, spaces, users)

Known Limitations (Disabled Tests)

The following tests are @Disabled due to API or test environment constraints. All are covered by unit tests.

Test Reason Unit Test Coverage
DeployTest.addApp() Apps cannot be deleted after creation AppClientTest.addApp_*
DeployTest.deployApp_getDeployStatus() Apps cannot be deleted after creation AppClientTest.deployApp_*, AppClientTest.getDeployStatus_*
DeployTest.deployApp_revert() Apps cannot be deleted after creation AppClientTest.deployApp_*
AppPluginsTest.addPlugins() Plugins cannot be deleted from app after adding AppClientTest.addPlugins_*
AppApiTest.getStatistics() Requires AppStatistics model update for new API fields AppClientTest.getStatistics_*
SpaceApiTest.deleteSpace() Requires space recreation (not available with pre-created resources) SpaceClientTest.deleteSpace_*
SpaceApiTest.getStatistics() Requires SpaceStatistics model update for new API fields SpaceClientTest.getStatistics_*

How to test

  1. Copy .env.example to .env and configure your kintone credentials:
    cd e2e-tests
    cp .env.example .env
    # Edit .env with your kintone environment settings
  2. Create required test apps in kintone (see e2e-tests/README.md)
  3. Run tests locally:
    ./bin/run-test.sh
  4. Or run specific test class:
    ./bin/run-test.sh --tests RecordApiTest

Checklist

  • Read CONTRIBUTING.md at the repository.
  • Updated documentation if it is required.
  • Added/updated tests if it is required. (or tested manually)

@shabaraba shabaraba force-pushed the test/add-e2e-test branch 2 times, most recently from 9ace714 to 774c2db Compare March 2, 2026 07:01
@shabaraba shabaraba changed the base branch from master to ci/e2e-workflow March 2, 2026 07:06
@shabaraba shabaraba changed the title test: add e2e tests test(e2e): add e2e tests Mar 2, 2026
@shabaraba shabaraba force-pushed the test/add-e2e-test branch from 774c2db to 0f25bf7 Compare March 3, 2026 05:42
Base automatically changed from ci/e2e-workflow to master March 24, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant