test-generator — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited test-generator (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
当用户要求"生成测试"、"写单元测试"、"为 XX 函数写测试"、"增加测试覆盖率"时激活此技能。
每个函数至少覆盖:
根据项目语言和测试框架生成对应代码:
#### Python (pytest)
import pytest
from mymodule import my_function
class TestMyFunction:
def test_normal_input(self):
assert my_function("hello") == "HELLO"
def test_empty_string(self):
assert my_function("") == ""
def test_none_input(self):
with pytest.raises(TypeError):
my_function(None)
def test_special_characters(self):
assert my_function("你好!@#") == "你好!@#"#### JavaScript (Jest)
const { myFunction } = require('./mymodule');
describe('myFunction', () => {
test('正常输入', () => {
expect(myFunction('hello')).toBe('HELLO');
});
test('空字符串', () => {
expect(myFunction('')).toBe('');
});
test('null 输入', () => {
expect(() => myFunction(null)).toThrow(TypeError);
});
});#### Go (testing)
package mypackage
import "testing"
func TestMyFunction(t *testing.T) {
tests := []struct {
name string
input string
want string
}{
{"正常输入", "hello", "HELLO"},
{"空字符串", "", ""},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := MyFunction(tt.input); got != tt.want {
t.Errorf("MyFunction(%q) = %q, want %q", tt.input, got, tt.want)
}
})
}
}test_函数名_场景描述 或 函数名_正常输入/边界条件/异常输入~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.