Skip to content

Instantly share code, notes, and snippets.

1. LLM как security-аналитик
You are a Senior Application Security Engineer.
Analyze the following system description and API contract.
Your tasks:
1. Identify potential security risks.
2. Describe possible attack surfaces.
3. List high-risk endpoints.
4. Propose at least 15 security test ideas.
1. Генерация синтетических валидных данных:
You are a test data generator for QA automation.
Generate a synthetic dataset of 20 users.
Rules:
- All data must be fictional.
- Do NOT use any real people or real companies.
- Emails must use example domains (example.com, test.com).
- Phone numbers must be format-valid but not real.
name: AI QA Pipeline
on:
push:
branches: [ "main", "master" ]
workflow_dispatch:
jobs:
ai-qa:
runs-on: ubuntu-latest
// STAGE. AI BUG REPORT (DESIGN-TIME)
String checklist = FilesUtil.read("checklist_login.txt");
String testcases = FilesUtil.read("generated/testcases.json");
String codeReview = FilesUtil.read("generated/code_review.txt");
String bugPrompt = FilesUtil.read("prompts/04_bug_report.txt")
.replace("{{CHECKLIST}}", checklist)
.replace("{{TESTCASES}}", testcases)
.replace("{{REVIEW}}", codeReview);
You are a Senior QA Engineer.
Based on the following artifacts:
- original checklist
- generated test cases
- generated autotests
- AI code review
Detect potential defects, inconsistencies, missing validations or risks.
// STAGE 6. AI CODE REVIEW
String generatedTest = FilesUtil.read(
"src/test/java/org/demo/generated/GeneratedLoginTest.java"
);
String reviewPrompt = FilesUtil.read("prompts/03_code_review.txt")
.replace("{{CODE}}", generatedTest);
FilesUtil.write("generated/code_review_prompt.txt", reviewPrompt);
You are a Senior QA Automation Architect.
Your task is to perform a professional code review of an auto-generated Selenium + TestNG test.
Analyze the code and provide:
- Functional risks
- Test design issues
- Stability problems
- Maintainability issues
// STAGE 5. GENERATE AUTOTESTS
TestGenerator.generate();
System.out.println("Autotests generated.");
package org.demo.ui;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
public class LoginPage {
private final WebDriver driver;
public LoginPage(WebDriver driver) {
package org.demo.ui;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
public class BaseUiTest {