@@ -437,70 +437,64 @@ If no security hot-spots are found:
437437Found no security hot-spots
438438```
439439
440- # Running Self-Validation
440+ # Self-Validation
441441
442- SonarMark includes built-in self- validation tests to verify functionality without requiring access to a real
443- SonarQube/SonarCloud server. The validation uses mock data to test core features .
442+ Self- validation produces a report demonstrating that SonarMark is functioning
443+ correctly. This is useful in regulated industries where tool validation evidence is required .
444444
445445## Running Validation
446446
447+ To perform self-validation:
448+
447449``` bash
448450sonarmark --validate
449451```
450452
451- ## Validation Tests
452-
453- The self-validation suite includes the following tests that verify core functionality:
454-
455- | Test Name | Description |
456- | :-------- | :---------- |
457- | ` SonarMark_QualityGateRetrieval ` | Verifies fetching and processing quality gate status from SonarQube/SonarCloud |
458- | ` SonarMark_IssuesRetrieval ` | Verifies fetching and processing code issues with severity classification |
459- | ` SonarMark_HotSpotsRetrieval ` | Verifies fetching and processing security hot-spots and vulnerabilities |
460- | ` SonarMark_MarkdownReportGeneration ` | Verifies generating markdown reports with quality metrics and findings |
453+ To save validation results to a file:
461454
462- These tests provide evidence of the tool's functionality and are particularly useful for:
455+ ``` bash
456+ sonarmark --validate --results results.trx
457+ ```
463458
464- - Verifying the installation is working correctly on different platforms and .NET versions
465- - Running automated tests in CI/CD pipelines without requiring SonarQube access
466- - Generating test evidence for compliance and traceability requirements
467- - Validating tool functionality before deployment
459+ The results file format is determined by the file extension: ` .trx ` for TRX (MSTest) format,
460+ or ` .xml ` for JUnit format.
468461
469- ** Note** : The test names with the ` SonarMark_ ` prefix are designed for clear identification in test
470- result files (TRX/JUnit) when integrating with larger projects or test frameworks.
462+ ## Validation Report
471463
472- ## Validation Output
464+ The validation report contains the tool version, machine name, operating system version,
465+ .NET runtime version, timestamp, and test results.
473466
474- Example output :
467+ Example validation report :
475468
476469``` text
477- SonarMark version 1.0.0
478- Copyright (c) DEMA Consulting
479-
480470# DEMA Consulting SonarMark
481- ## Self-Validation Tests
482471
483- [PASS] Quality Gate Status Retrieval
484- [PASS] Issues Retrieval
485- [PASS] Hot-Spots Retrieval
486- [PASS] Markdown Report Generation
472+ | Information | Value |
473+ | :------------------ | :------------------------------------------------- |
474+ | SonarMark Version | 1.0.0 |
475+ | Machine Name | BUILD-SERVER |
476+ | OS Version | Ubuntu 22.04.3 LTS |
477+ | DotNet Runtime | .NET 10.0.0 |
478+ | Time Stamp | 2024-01-15 10:30:00 UTC |
479+
480+ ✓ SonarMark_QualityGateRetrieval - Passed
481+ ✓ SonarMark_IssuesRetrieval - Passed
482+ ✓ SonarMark_HotSpotsRetrieval - Passed
483+ ✓ SonarMark_MarkdownReportGeneration - Passed
487484
488485Total Tests: 4
489486Passed: 4
490487Failed: 0
491488```
492489
493- ## Saving Validation Results
490+ ## Validation Tests
494491
495- Save results in TRX or JUnit XML format for integration with test reporting tools :
492+ Each test proves specific functionality works correctly :
496493
497- ``` bash
498- # TRX format (for Azure DevOps, Visual Studio)
499- sonarmark --validate --results validation-results.trx
500-
501- # JUnit XML format (for Jenkins, GitLab CI)
502- sonarmark --validate --results validation-results.xml
503- ```
494+ - ** ` SonarMark_QualityGateRetrieval ` ** - Verifies fetching and processing quality gate status from SonarQube/SonarCloud.
495+ - ** ` SonarMark_IssuesRetrieval ` ** - Verifies fetching and processing code issues with severity classification.
496+ - ** ` SonarMark_HotSpotsRetrieval ` ** - Verifies fetching and processing security hot-spots and vulnerabilities.
497+ - ** ` SonarMark_MarkdownReportGeneration ` ** - Verifies generating markdown reports with quality metrics and findings.
504498
505499# Best Practices
506500
0 commit comments