Homeโ†’Tool modules

๐Ÿงช Testing Your Firecrawl Tool Module

Testing involves three main stages: local testing, local node testing, and hosted node testing.

Testing Stages

After making changes to your tool module, testing involves the following steps:

๐Ÿ–ฅ๏ธ Local Testing Without Node

You can run the module directly using:

Sample output for web scraping:

Sample output for data extraction:

After testing, iterate on your module and commit your changes as needed.

๐ŸŒ Testing on Local or Hosted Node

Prerequisites for Local Node

  1. Set up your local Naptha Node and Hub:
  2. Configure the Naptha SDK:

Publishing to GitHub

  1. Add a version tag:
  1. Verify your deployment.json configuration. Make sure it includes all required fields:
    • name: Your tool module's identifier
    • description: Clear explanation of your tool's purpose
    • parameters: Expected input format
    • module_type: Set as "tool"
    • module_version: Your semantic version
    • module_entrypoint: Usually "run.py"
    • execution_type: Set as "package"
  1. Publish to Naptha Hub:

Alternatively, publish to IPFS:

You'll receive an IPFS hash and can verify the upload at: http://provider.akash.pro:30584/ipfs/<ipfs_hash>

  1. Verify module registration:

Once your module is published, you can test it:

Verify your module works correctly at each testing stage before moving to the next.

Next Steps

In the next module, we'll explore:

  • Advanced tool module features
  • Performance optimization techniques
  • Integration with other Naptha modules
  • Contributing to the Naptha ecosystem

Ready to enhance your tool module? Let's move on to the next lesson!