OriginTrail
  • Get started with OriginTrail
  • OriginTrail Ecosystem — Call for Papers (Coming Soon)
  • Key Concepts
    • Decentralized Knowledge Graph (DKG)
    • DKG key concepts
  • Build with DKG
    • Quickstart (test drive the DKG in 5 mins)
      • Quickstart with Node.js
      • Quickstart with Python
    • ChatDKG builder toolkit
      • DKG SDK
        • Development environment setup
        • DKG Javascript SDK (dkg.js)
          • Interact with DKG paranets
          • Knowledge submission & curation
          • Paranet's incentives pool implementation
        • DKG Python SDK (dkg.py)
      • DKG paranets
        • Deploying a DKG paranet
        • Building with DKG paranets
        • Syncing a DKG Paranet
        • Initial Paranet Offerings (IPOs)
          • IPO specification
          • Launching your IPO
          • Paranet's incentives pool
          • IPO voting
      • AI agents
        • ElizaOS DKG agent
        • Custom DKG Python agent
        • Custom DKG JavaScript agent
    • DKG Edge Node
      • DKG Edge Node architecture
      • Get started with the Edge Node boilerplate
        • Automated setup with the installer
        • Manual setup
        • Usage example
      • Customize & build with the Edge Node
      • Knowledge Mining and dRAG examples
      • Deploy your Edge Node based project
        • Automated deployment with installer
      • DKG Edge Node inception program
      • DKG Edge Node API documentation
    • DKG Core Node
      • Run a V8 Core Node on testnet
        • Preparation for V8 DKG Core Node deployment
        • V8 DKG Core Node installation
      • Run a V8 Core Node on mainnet
        • Preparation for V8 DKG Core Node deployment
        • V8 DKG Core Node installation
  • Delegated staking
    • Delegated staking—Introduction
      • Step-by-step staking
      • Redelegating stake
  • Integrated Blockchains
    • Base blockchain
      • Connect to Base
    • Gnosis chain
      • Connect to Gnosis
    • NeuroWeb
    • Teleport instructions - NeuroWeb
    • Bridging to Moonbeam
    • Deployed smart contracts
  • Bounties & rewards
    • General bug bounty
    • Code contributions & V8 bug bounty
  • Whitepapers & RFCs
    • OriginTrail whitepaper
    • OriginTrail RFCs
  • Useful Resources
    • What's new with OriginTrail V8
    • DKG V8 guidebook
      • Protocol updates
      • Feature roadmap
      • How to upgrade to V8?
    • Public nodes
    • Tutorials
    • Test token faucet
    • Development principles
    • Community created resources
    • Linked data & knowledge graphs
    • Available networks, network details and RPCs
    • OT Node Engine implementation details
      • Modules
      • Command Executor
    • Contribution guidelines
      • Guidelines for automated test contributions
    • Explore the OriginTrail ecosystem
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Useful Resources
  2. Contribution guidelines

Guidelines for automated test contributions

Contribute to DKG by growing the automated test suite for the ot-node!

PreviousContribution guidelinesNextExplore the OriginTrail ecosystem

Last updated 3 months ago

Was this helpful?

Welcome to the automated tests contribution guidelines! By contributing to the ot-node automated test suite, you help further develop the OriginTrail technology and increase the robustness of the DKG implementation. Detailed instructions on how you can participate are described below. However, if you need any assistance, feel free to and ask for help from the community or core developers there.

This guide applies to the DKG node GitHub repo, particularly for the v8 branches (v8/develop being the default branch). If you are creating a contribution, branch off from v8/develop.

We use for running automated tests. This framework uses the Gherkin language, which allows expected software behaviors to be specified in a logical language that can be easily understood.

For a detailed guide on how to write BDD scenarios, visit .

Tests need to cover errors listed on the page. Different errors are thrown in different commands, all of which are executed by the command executor. To learn what the command executor is and how it works, please visit .

Steps to contribute BDD tests

  1. Check out to see current test requirements. Check out the existing steps available in ./ot-node/test/bdd/steps.

  2. Create a feature file where you'll define new scenarios. Features should be located in test/bdd/features directory with the appropriate file name format: <operation>-errors.feature (e.g., publish-errors.feature, get-errors.feature).

  3. When you're done with the scenarios that you've created, following the , create a draft pull request (PR) and tag at least two core developers (and as many other community members as you wish). The team members will review the feature files and either give approval or request for changes. Once you get a confirmation that the feature files are satisfactory, you can continue with the corresponding step definitions. This helps provide feedback on the contribution early on.

  4. Put step definitions in the ./ot-node/test/bdd/steps directory.

  5. Implement the steps and ensure that both old tests and the new ones you just created are passing locally (use the npm run test:bdd command). Node logs can be found in ./ot-node/test/bdd/log/<scenario-name>/origintrail-test-<index>.log(e.g. test/bdd/log/Publishing-a-valid-assertion/origintrail-test-0.log).

  6. When you're satisfied with the scenarios and their step definitions, you may now mark your PR draft as "Ready for review".

  7. There will likely be feedback on your PR before it gets approved, so make sure to follow the status of your PR contribution. After PR approval, your changes will be merged.

  8. Congratulations! You've just made ot-node more robust

🎉
jump into Discord
Cucumber.js
Cucumber docs
GitHub discussions
Command Executor
GitHub discussions
Contribution guidelines