001package org.w3.ldp.testsuite.annotations; 002 003import java.lang.annotation.Documented; 004import java.lang.annotation.Retention; 005import java.lang.annotation.RetentionPolicy; 006 007@Documented 008@Retention(RetentionPolicy.RUNTIME) 009public @interface SpecTest { 010 011 /** 012 * Describes the status of the Test Case 013 */ 014 public static enum STATUS { 015 016 /** 017 * WG_PENDING (default) - no official recommendation from the WG 018 * supporting the specification being tested by this test suite. 019 */ 020 WG_PENDING, 021 022 /** WG_APPROVED - working group has approved this test case */ 023 WG_APPROVED, 024 025 /** WG_DEPRECATED - no longer recommended by WG */ 026 WG_DEPRECATED, 027 028 /** 029 * WG_EXTENSION - valuable test case but not part of the WG approved set 030 */ 031 WG_EXTENSION, 032 033 /** 034 * WG_CLARIFICATION - requires further clarification from the working group 035 */ 036 WG_CLARIFICATION 037 } 038 039 ; 040 041 /** 042 * The URI of the spec 043 */ 044 public String specRefUri() default "No Specification URI"; 045 046 /** 047 * The status of the test case, pending or approved 048 */ 049 public STATUS approval() default STATUS.WG_PENDING; 050 051 /** 052 * For reporting purposes, the way the Test Case has been implemented 053 */ 054 public static enum METHOD { 055 /** NOT_IMPLEMENTED (default) - possible to implement, just not done */ 056 NOT_IMPLEMENTED, 057 058 /** AUTOMATED - implementation complete */ 059 AUTOMATED, 060 061 /** MANUAL - server test but not automated */ 062 MANUAL, 063 064 /** CLIENT_ONLY - test is only client-side, this test suite doesn't test it. */ 065 CLIENT_ONLY, 066 067 /** 068 * INDIRECT - other test cases indirectly cover this test case 069 */ 070 INDIRECT 071 }; 072 073 /** 074 * Whether the test case itself has been implemented or not 075 */ 076 public METHOD testMethod() default METHOD.NOT_IMPLEMENTED; 077 078 /** 079 * Whether further comment that can be useful 080 * The description property matches the spec requirement, 081 * the comment can be used to describe whether the test only 082 * covers part of the spec requirement 083 * ie) Shared specRefUri 084 */ 085 public String comment() default ""; 086 087 /** 088 * Steps needed to be taken to validate the test. For manual/client tests 089 * it specify the actions (step) what should be done to verify the result. 090 * For automation tests, it summarized what the automated test does. 091 * @return 092 */ 093 public String[] steps() default {}; 094 095 /** 096 * List out the test class that covers an indirect test. 097 */ 098 public Class<?>[] coveredByTests() default {}; 099 100 /** 101 * List out the group values that covers the indirect test. 102 */ 103 public String[] coveredByGroups() default {}; 104 105}