-
Notifications
You must be signed in to change notification settings - Fork 885
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SINT: Add tagging of tests with references to (XMPP) specifications
A new annotation is introduced (`SpecificationReference`) that can be used to annotate a SINT test. These properties are available in the annotation: - `document`: Iidentifier for a specification document, such as 'RFC 6120' or 'XEP-0485' - `section`: Identifier for a section (or paragraph), such as '6.2.1' - `quote`: A quotation of relevant text from the section The SINT execution framework is modified so that two new configuration options are available: - `enabledSpecifications` - `disabledSpecifications` These operate on the value of the `document` property of the annotation. Their usage is comparable to that of the pre-existing `enabledTests` and `disabledTest` configuration options. Execution output now includes the document, section and quote that's on the annotated test, when the test fails. This allows an end-user to easily correspond a test failure with a particular specification.
- Loading branch information
Showing
4 changed files
with
163 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...st/src/main/java/org/igniterealtime/smack/inttest/annotations/SpecificationReference.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* | ||
* Copyright 2024 Guus der Kinderen | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.igniterealtime.smack.inttest.annotations; | ||
|
||
import java.lang.annotation.*; | ||
|
||
/** | ||
* Reference to a specific part of a specification. | ||
* | ||
* @author Guus der Kinderen, [email protected] | ||
*/ | ||
@Documented | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.METHOD) | ||
public @interface SpecificationReference | ||
{ | ||
/** | ||
* Unique identifier for a specification document, such as 'RFC 6120' or 'XEP-0485' | ||
* | ||
* @return a document identifier | ||
*/ | ||
String document(); | ||
|
||
/** | ||
* Unique identifier for a section (or paragraph) of the document referenced by {@link #document()}, such as '6.2.1'. | ||
* | ||
* @return a document section identifier | ||
*/ | ||
String section(); | ||
|
||
/** | ||
* A quotation of relevant text from the section referenced by {@link #section()}. | ||
* | ||
* @return human-readable text from the references document and section. | ||
*/ | ||
String quote(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters