docs/tr/skills/quarkus-verification/SKILL.md
Verification loop for Quarkus projects: build, static analysis, tests with coverage, security scans, native compilation, and diff review before release or PR.
npx skillsauth add affaan-m/everything-claude-code quarkus-verificationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
PR'lardan önce, büyük değişikliklerden sonra ve deployment öncesi çalıştırın.
# Maven
mvn clean verify -DskipTests
# Gradle
./gradlew clean assemble -x test
Build başarısız olursa, durdurun ve derleme hatalarını düzeltin.
mvn checkstyle:check pmd:check spotbugs:check
mvn sonar:sonar \
-Dsonar.projectKey=my-quarkus-project \
-Dsonar.host.url=http://localhost:9000 \
-Dsonar.login=${SONAR_TOKEN}
# Tüm testleri çalıştır
mvn clean test
# Kapsam raporu oluştur
mvn jacoco:report
# Kapsam eşiğini zorla (%80)
mvn jacoco:check
# Veya Gradle ile
./gradlew test jacocoTestReport jacocoTestCoverageVerification
Mock'lanmış bağımlılıklarla servis mantığını test edin:
@ExtendWith(MockitoExtension.class)
class UserServiceTest {
@Mock UserRepository userRepository;
@InjectMocks UserService userService;
@Test
void createUser_validInput_returnsUser() {
var dto = new CreateUserDto("Alice", "[email protected]");
// Panache persist() void döndürür — doNothing + verify kullanın
doNothing().when(userRepository).persist(any(User.class));
User result = userService.create(dto);
assertThat(result.name).isEqualTo("Alice");
verify(userRepository).persist(any(User.class));
}
}
Gerçek veritabanıyla (Testcontainers) test edin:
@QuarkusTest
@QuarkusTestResource(PostgresTestResource.class)
class UserRepositoryIntegrationTest {
@Inject
UserRepository userRepository;
@Test
@Transactional
void findByEmail_existingUser_returnsUser() {
User user = new User();
user.name = "Alice";
user.email = "[email protected]";
userRepository.persist(user);
Optional<User> found = userRepository.findByEmail("[email protected]");
assertThat(found).isPresent();
assertThat(found.get().name).isEqualTo("Alice");
}
}
REST Assured ile REST endpoint'lerini test edin:
@QuarkusTest
class UserResourceTest {
@Test
void createUser_validInput_returns201() {
given()
.contentType(ContentType.JSON)
.body("""
{"name": "Alice", "email": "[email protected]"}
""")
.when().post("/api/users")
.then()
.statusCode(201)
.body("name", equalTo("Alice"));
}
@Test
void createUser_invalidEmail_returns400() {
given()
.contentType(ContentType.JSON)
.body("""
{"name": "Alice", "email": "invalid"}
""")
.when().post("/api/users")
.then()
.statusCode(400);
}
}
Ayrıntılı kapsam için target/site/jacoco/index.html sayfasını kontrol edin:
mvn org.owasp:dependency-check-maven:check
CVE'ler için target/dependency-check-report.html raporunu inceleyin.
# Güvenlik açığı olan extension'ları kontrol et
mvn quarkus:audit
# Tüm extension'ları listele
mvn quarkus:list-extensions
docker run -t owasp/zap2docker-stable zap-api-scan.py \
-t http://localhost:8080/q/openapi \
-f openapi
GraalVM native image uyumluluğunu test edin:
# Native executable oluştur
mvn package -Dnative
# Veya container ile
mvn package -Dnative -Dquarkus.native.container-build=true
# Native executable'ı test et
./target/*-runner
# Temel smoke testleri çalıştır
curl http://localhost:8080/q/health/live
curl http://localhost:8080/q/health/ready
Yaygın sorunlar:
quarkus.native.resources.includes ile kaynakları dahil edinÖrnek reflection yapılandırması:
@RegisterForReflection(targets = {MyDynamicClass.class})
public class ReflectionConfiguration {}
// load-test.js
import http from 'k6/http';
import { check } from 'k6';
export const options = {
stages: [
{ duration: '30s', target: 50 },
{ duration: '1m', target: 100 },
{ duration: '30s', target: 0 },
],
};
export default function () {
const res = http.get('http://localhost:8080/api/markets');
check(res, {
'status is 200': (r) => r.status === 200,
'response time < 200ms': (r) => r.timings.duration < 200,
});
}
Çalıştırın:
k6 run load-test.js
# Liveness
curl http://localhost:8080/q/health/live
# Readiness
curl http://localhost:8080/q/health/ready
# Tüm sağlık kontrolleri
curl http://localhost:8080/q/health
# Metrikler (etkinleştirilmişse)
curl http://localhost:8080/q/metrics
Beklenen yanıtlar:
{
"status": "UP",
"checks": [
{
"name": "Database connection",
"status": "UP"
}
]
}
# Container image oluştur
mvn package -Dquarkus.container-image.build=true
# Veya belirli registry ile
mvn package \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.registry=docker.io \
-Dquarkus.container-image.group=myorg \
-Dquarkus.container-image.tag=1.0.0
# Container'ı test et
docker run -p 8080:8080 myorg/my-quarkus-app:1.0.0
# Trivy
trivy image myorg/my-quarkus-app:1.0.0
# Grype
grype myorg/my-quarkus-app:1.0.0
# Tüm yapılandırma özelliklerini kontrol et
mvn quarkus:info
# Tüm yapılandırma kaynaklarını listele
curl http://localhost:8080/q/dev/io.quarkus.quarkus-vertx-http/config
/q/swagger-ui)OpenAPI spec oluşturun:
curl http://localhost:8080/q/openapi -o openapi.json
#!/bin/bash
set -e
echo "=== Faz 1: Build ==="
mvn clean verify -DskipTests
echo "=== Faz 2: Static Analiz ==="
mvn checkstyle:check pmd:check spotbugs:check
echo "=== Faz 3: Testler + Kapsam ==="
mvn test jacoco:report jacoco:check
echo "=== Faz 4: Güvenlik Taraması ==="
mvn org.owasp:dependency-check-maven:check
echo "=== Faz 5: Native Derleme ==="
mvn package -Dnative -Dquarkus.native.container-build=true
echo "=== Tüm Fazlar Tamamlandı ==="
echo "Raporları inceleyin:"
echo " - Kapsam: target/site/jacoco/index.html"
echo " - Güvenlik: target/dependency-check-report.html"
echo " - Native: target/*-runner"
name: Verification
on: [push, pull_request]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- name: Build
run: mvn clean verify -DskipTests
- name: Test with Coverage
run: mvn test jacoco:report jacoco:check
- name: Security Scan
run: mvn org.owasp:dependency-check-maven:check
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
files: target/site/jacoco/jacoco.xml
development
Share durable, inspectable context and handoffs between Claude, Codex, Hermes, Cursor, OpenCode, and other agents through the local ECC Memory Vault. Use when an agent must save work state, transfer context, resume another agent's task, or search shared project knowledge.
development
Use when multiple consumers and providers must evolve an API or event schema without field drift, integration surprises, or one side silently redefining the interface.
tools
Query live GPU inventory, submit an authenticated Itô fixed-rate RFQ, inspect RFQ or procurement status, and run explicitly gated node qualification through the separately installed canonical CLI. Use when a user asks to find H100/H200 capacity, request a fixed compute rate, check Itô compute status, or validate GPU nodes.
data-ai
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents. v2.1 adds project-scoped instincts to prevent cross-project contamination.