๐งช 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
- Set up your local Naptha Node and Hub:
- Clone the Naptha Node repository (Note: Currently private - please request access in the Naptha community)
- Set
LOCAL_HUB=True
in the node repository's.env
file
- Configure the Naptha SDK:
- Install using the SDK instructions
- Set in your
.env
file:
Publishing to GitHub
- Add a version tag:
- Verify your
deployment.json
configuration. Make sure it includes all required fields:name
: Your tool module's identifierdescription
: Clear explanation of your tool's purposeparameters
: Expected input formatmodule_type
: Set as "tool"module_version
: Your semantic versionmodule_entrypoint
: Usually "run.py"execution_type
: Set as "package"
- 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>
- 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!