This document provides testing information relevant to users of the ioBroker Copilot Instructions template. For detailed technical testing infrastructure, see TESTING.md.
- Testing Your Template Integration
- Validating Copilot Instructions
- Automated Template Version Checking
- Testing Best Practices
After integrating the ioBroker Copilot Instructions template into your adapter repository, use these tests to verify everything is working correctly.
# Test that Copilot uses the ioBroker instructions
# 1. Open any .js or .ts file in your adapter
# 2. Start typing ioBroker-related code:
# Example: // Create new ioBroker adapter instance
# Example: this.setState(
# Example: // Handle device connection
# 3. Copilot should now provide ioBroker-specific suggestions
# 4. Check that suggestions follow the patterns from the templateAfter successful integration, you should observe:
- Context-aware suggestions specific to ioBroker development patterns
- Error handling that follows ioBroker best practices
- Test suggestions that include
@iobroker/testingframework usage - README updates that follow ioBroker documentation standards
- Dependency management suggestions aligned with ioBroker ecosystem
// Type this comment in a JavaScript file:
// Create new ioBroker adapter instance
// Expected: Copilot should suggest ioBroker adapter initialization patterns// Type this code:
this.setState(
// Expected: Copilot should suggest proper ioBroker state setting patterns// Type this comment:
// Handle connection error
// Expected: Copilot should suggest ioBroker-appropriate error handling// Type this comment:
// Write integration test
// Expected: Copilot should suggest @iobroker/testing framework patternsCheck that your template includes the correct version information:
# Verify your local template version
grep "Version:" .github/copilot-instructions.md | head -1Expected output should show the current version:
**Version:** 0.4.0
Ensure your template references the correct source:
# Check template source reference
grep "Template Source:" .github/copilot-instructions.md | head -1Expected output:
**Template Source:** https://github.com/DrozmotiX/ioBroker-Copilot-Instructions
Verify key sections are present in your template:
# Check for essential sections
grep -E "## (Testing|README Updates|Dependency Updates|JSON-Config|Error Handling)" .github/copilot-instructions.mdUse the provided script to check if your template is up-to-date:
# Download and run the version check script
curl -s https://raw.githubusercontent.com/DrozmotiX/ioBroker-Copilot-Instructions/main/scripts/check-template-version.sh | bashThis script will:
- Compare your local template version with the latest available
- Provide update guidance if your template is outdated
- Show you what's changed in newer versions
For automated monitoring, see the GitHub Action template which provides:
- Weekly automated checks
- Automatic issue creation when updates are available
- Preservation of custom content during updates echo "Template is outdated. Current: $CURRENT_VERSION, Latest: $LATEST_VERSION" exit 1 fi
## Testing Best Practices
### Regular Testing Schedule
- **Weekly**: Test basic Copilot functionality with ioBroker patterns
- **Monthly**: Check for template updates and validate suggestions quality
- **Before releases**: Ensure Copilot suggestions align with your adapter's specific patterns
### Documentation Testing
When updating your adapter documentation, verify that Copilot suggestions:
1. **Follow ioBroker standards**: Suggestions should match community conventions
2. **Include required sections**: Installation, Configuration, Usage, Changelog, License, Support
3. **Use proper formatting**: README entries should follow the `## **WORK IN PROGRESS**` pattern
4. **Reference issues**: Changelog entries should include issue references (fixes #XX)
### Code Quality Testing
Regularly verify that Copilot suggestions:
- Use `@iobroker/adapter-core` for base functionality
- Prefer built-in Node.js modules when possible
- Include proper error handling for ioBroker contexts
- Follow established ioBroker adapter patterns
### Integration Testing
Test Copilot suggestions for:
- **CI/CD integration**: GitHub Actions workflows for ioBroker adapters
- **Testing frameworks**: `@iobroker/testing` usage patterns
- **Dependency management**: npm best practices for ioBroker ecosystem
- **Security practices**: Credential handling and API testing patterns
### Performance Testing
Monitor Copilot performance with your template:
- **Response time**: Suggestions should appear promptly
- **Relevance**: Suggestions should be contextually appropriate
- **Accuracy**: Code suggestions should be syntactically correct
- **Consistency**: Similar contexts should produce similar suggestions
### Troubleshooting Common Issues
#### Copilot Not Using Template Instructions
**Symptoms**: Suggestions don't reflect ioBroker patterns
**Solutions**:
1. Verify `.github/copilot-instructions.md` exists and is properly formatted
2. Check that the template version is current
3. Restart your editor to reload Copilot instructions
4. Ensure the file is committed to your repository
#### Generic Suggestions Instead of ioBroker-Specific
**Symptoms**: Suggestions are too generic or don't match ioBroker conventions
**Solutions**:
1. Check template integration completeness
2. Verify customization sections marked with `[CUSTOMIZE]` are properly configured
3. Ensure your code context clearly indicates ioBroker development
4. Test with more specific ioBroker-related comments and code
#### Outdated Suggestions
**Symptoms**: Suggestions reference old patterns or deprecated methods
**Solutions**:
1. Update to the latest template version
2. Review changelog for breaking changes or new best practices
3. Clear Copilot cache if available in your editor
4. Verify your local template matches the latest repository version
---
**For setup instructions**, see the [setup guide](setup.md). **For technical testing details**, consult [TESTING.md](../TESTING.md). **Return to the [main README](../README.md)** for overview and navigation.