Integration Tests logo

Integration Tests

OrganizationPopular
internet-court
integration-tests

Write and run integration tests against a GenLayer environment.

Overview

Publisherinternet-court
Repositoryinternet-court-skill
Skill nameintegration-tests
Stars
5.8K
Forks
106
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by internet-court on GitHub. Read the source before you install it.

Installation

Install the Integration Tests AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/internet-court/internet-court-skill.git /tmp/internet-court-skill
mkdir -p .claude/skills
cp -r /tmp/internet-court-skill/vendored/genlayer/integration-tests .claude/skills/integration-tests
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Integration Tests in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Integration Tests on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Integration Tests is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Integration Tests

Run contracts against a real GenLayer environment (GLSim, Studio, or testnet) with full consensus validation.

Running Tests

bash
# Against default network (from gltest.config.yaml)
gltest tests/integration/ -v -s

# Against specific network
gltest tests/integration/ -v -s --network localnet
gltest tests/integration/ -v -s --network studionet
gltest tests/integration/ -v -s --network testnet_bradbury

Always use -v -s for visible output during development.

Test Pattern

python
from gltest import get_contract_factory
from gltest.assertions import tx_execution_succeeded

def test_full_flow():
    factory = get_contract_factory("MyContract")
    contract = factory.deploy(args=[])

    # Write methods return transaction receipts
    tx_receipt = contract.set_data(args=["hello"]).transact()
    assert tx_execution_succeeded(tx_receipt)

    # Read methods return values directly
    result = contract.get_data(args=[contract.address]).call()
    assert result == "hello"

ACCEPTED and FINALIZED are transaction lifecycle states, not proof that contract execution succeeded. A transaction can be accepted and finalized with an execution error, and failed execution applies no state changes. For deploy transactions, failed execution means no contract is created.

Always assert tx_execution_succeeded(receipt) before reading state, checking schema/code, or treating a missing contract as an infrastructure issue.

Key Differences from Direct Mode

Direct ModeIntegration Tests
Speed~30ms~seconds to minutes
Server requiredNoYes (GLSim, Studio, or testnet)
ConsensusLeader onlyFull leader + validators
Write methodsReturn values directlyReturn transaction receipts
Read methodsReturn values directlyUse .call()
Mockingmock_web() / mock_llm()Real web/LLM calls

Write vs Read Calls

Write methods (state-changing):

python
# .transact() submits and waits for consensus
tx_receipt = contract.method_name(args=[arg1, arg2]).transact()
assert tx_execution_succeeded(tx_receipt)

Read methods (view-only):

python
# .call() reads without transaction
result = contract.view_method(args=[arg1]).call()

Configuration (gltest.config.yaml)

yaml
contract_path: contracts/

networks:
  localnet:
    # GenLayer Studio running locally
  studionet:
    # studio.genlayer.com — gasless, no funding needed (0 GEN balance is fine)
  testnet_bradbury:
    accounts:
      - "${ACCOUNT_PRIVATE_KEY_1}"
      - "${ACCOUNT_PRIVATE_KEY_2}"

Test Markers

python
import pytest

@pytest.mark.slow
def test_expensive_operation():
    """Excluded by default. Run with: gltest -m slow"""
    pass

Environments

  • GLSim (pip install genlayer-test[sim], glsim --port 4000 --validators 5) — lightweight, no Docker, ~1s startup. Runs Python natively, not in GenVM. Good for fast iteration.
  • Studio local (genlayer up) — full GenVM, real consensus, Docker required. Validates runtime compatibility.
  • studio.genlayer.com (StudioNet) — hosted Studio, no setup, rate-limited (see Common Issues). Gasless: no tokens required. Accounts with 0 GEN balance can deploy and run tests normally.
  • Testnet Bradbury — real network, requires funded accounts.

When to Use Integration Tests

  • Validating consensus (leader + validators agree)
  • Testing real web requests and LLM calls
  • Pre-deployment smoke tests
  • Verifying contract works in actual GenVM (not just Python runner)

Direct mode should cover most logic testing. Use integration tests for final validation before deploying.

Common Issues

"Transaction not found" errors

Clear cache: rm -rf .gltest_cache

Slow tests

Run single tests during development:

bash
gltest tests/integration/test_file.py::test_specific -v -s

JSON serialization

When working with mock validators, convert to dicts:

python
transaction_context = {"validators": [v.to_dict() for v in mock_validators]}

Studio rate limits (HTTP 429 / -32429)

studio.genlayer.com enforces per-IP limits: 60 req/min, 1000 req/hr, 10000 req/day. Limits aren't permanent — once tripped, further requests are rejected until the current window resets (next minute / hour / day cycle). Throttle batch tests, run heavy suites against localnet (GLSim or local Studio), or pace .transact() calls.

-32028 is the related pending-queue cap — up to 32 in-flight txs per sender; a separate cap also applies per contract to prevent flooding the shared Studio. Wait for receipts before submitting the next batch instead of firing in parallel.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Integration Tests AI skill do?

Write and run integration tests against a GenLayer environment.

Why use Integration Tests on TypingMind?

Because you install it once and use it with any model. Integration Tests is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Integration Tests in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/internet-court/internet-court-skill/tree/main/vendored/genlayer/integration-tests. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Integration Tests?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Integration Tests?

As many as you like. As long as a model supports skills, you can use Integration Tests with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Integration Tests AI skill free?

It is published on GitHub by internet-court. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇