diff --git a/plugins/org.etsi.mts.tdl.library/.classpath b/plugins/org.etsi.mts.tdl.library/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..685a6999c9acba0d0158b0929d7a4d384644452e --- /dev/null +++ b/plugins/org.etsi.mts.tdl.library/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/plugins/org.etsi.mts.tdl.library/.project b/plugins/org.etsi.mts.tdl.library/.project new file mode 100644 index 0000000000000000000000000000000000000000..c6e2ee4d346214df5080b87809e67b41c3928bdc --- /dev/null +++ b/plugins/org.etsi.mts.tdl.library/.project @@ -0,0 +1,45 @@ + + + org.etsi.mts.tdl.library + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + + + 1681412457721 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/plugins/org.etsi.mts.tdl.library/.settings/org.eclipse.core.resources.prefs b/plugins/org.etsi.mts.tdl.library/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000000000000000000000000000000000..99f26c0203a7844de00dbfc56e6a35d8ed3c022c --- /dev/null +++ b/plugins/org.etsi.mts.tdl.library/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/plugins/org.etsi.mts.tdl.library/.settings/org.eclipse.jdt.core.prefs b/plugins/org.etsi.mts.tdl.library/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..a58ebdcad300d0a088dcbd63941d2c89e78a4f98 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.library/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,15 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=11 diff --git a/plugins/org.etsi.mts.tdl.library/.settings/org.eclipse.m2e.core.prefs b/plugins/org.etsi.mts.tdl.library/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..f897a7f1cb2389f85fe6381425d29f0a9866fb65 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.library/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/plugins/org.etsi.mts.tdl.library/META-INF/MANIFEST.MF b/plugins/org.etsi.mts.tdl.library/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..f70487877b3b0fab0afdd46280baeb21744eb188 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.library/META-INF/MANIFEST.MF @@ -0,0 +1,7 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Standard Libraries +Bundle-SymbolicName: org.etsi.mts.tdl.library +Bundle-Version: 1.0.0.qualifier +Automatic-Module-Name: org.etsi.mts.tdl.library +Export-Package: org.etsi.mts.tdl.library diff --git a/plugins/org.etsi.mts.tdl.library/build.properties b/plugins/org.etsi.mts.tdl.library/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..56d776555503f2905e0642aae5be7938371a965d --- /dev/null +++ b/plugins/org.etsi.mts.tdl.library/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = target/classes/ +bin.includes = META-INF/,\ + . diff --git a/plugins/org.etsi.mts.tdl.library/pom.xml b/plugins/org.etsi.mts.tdl.library/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..133997be495b051f4b213dd32ab096776e0edf40 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.library/pom.xml @@ -0,0 +1,19 @@ + + 4.0.0 + + org.etsi.mts.tdl + org.etsi.mts.tdl.parent + 1.0.0-SNAPSHOT + ../../org.etsi.mts.tdl.parent + + + org.etsi.mts.tdl.library + eclipse-plugin + + + + maven-compiler-plugin + + + + \ No newline at end of file diff --git a/plugins/org.etsi.mts.tdl.library/src/org/etsi/mts/tdl/library/HTTP.tdltx b/plugins/org.etsi.mts.tdl.library/src/org/etsi/mts/tdl/library/HTTP.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..b1a4f2f0302a374641989f934db04e6e73cee91d --- /dev/null +++ b/plugins/org.etsi.mts.tdl.library/src/org/etsi/mts/tdl/library/HTTP.tdltx @@ -0,0 +1,126 @@ +Package HTTP { + Package MessageBasedConfiguration { + Import all from MessageBased + Message Gate HTTPGate accepts Request,Response + Component API { + //Add variables and timers here or define new component types and configurations + gate HTTPGate http + } + Configuration BasicClientServer { + API client as Tester, + API server as SUT, + connect client::http to server::http + } + + } Note : "Message based types and instances" + + Package MessageBased { + Import all from Standard + + //Generic Method type -> required for generation!!! + Enumerated Method { + Method GET, + Method POST, + Method PUT, + Method PATCH, + Method DELETE + } + + //Generic Request type + Structure Request ( + String uri, + optional Method method, + optional Headers headers, + optional Parameters parameters, + optional Body body + ) + + //Generic Request instances + Request GET ( ) + Request POST ( ) + Request PUT ( ) + Request PATCH ( ) + Request DELETE ( ) + + //Generic Response type + Structure Response ( + optional Integer status, + optional String statusMessage, + optional Headers headers, + optional Body body + ) + + //Generic Response instances, name = status code + + Response r200 (statusMessage = "OK") + Response r201 (statusMessage = "Created") + Response r204 (statusMessage = "No Content") + Response r400 (statusMessage = "Bad Request") + Response r401 (statusMessage = "Not Found") + Response r403 (statusMessage = "Not Authorized") + Response r404 (statusMessage = "Forbidden") + + //Generic Response instances, name = status message + Response OK (status = "200") + Response Created (status = "201") + Response NoContent (status = "204") + Response BadRequest (status = "400") + Response NotFound (status = "404") + Response NotAuthorized (status = "401") + Response Forbidden (status = "403") + + //supporting types + Collection Parameters of Parameter + Structure Parameter ( + Location location, + String ^name, + String ^value + ) + Type Location + Location path + Location query + + //may need a structure, not necessarily relevant in standardized testing + Location cookie + + //separate headers -> not necessary + //Location header; + Collection Headers of Header + Structure Header ( + String ^name, + String ^value + //not relevant in TDL? + //optional contentLength of type Integer, + //optional contentType of type String + ) + + //Base body for extension + Structure Body ( ) + + //Basic string body + Structure StringBody extends Body ( + String text + ) + + //Basic wrapper for collection responses + Structure CollectionBody extends Body ( + Bodies items + ) + + //Any body can be included + //If consistent type is needed, a custom subtype shall be defined and used + Collection Bodies of Body + + //Custom collection data instances can be defined + // - inline in the responses + // - predefined as a separate data element + //Custom collection data instances can be defined + //to enforce type consistency specific for API + + //Basic form body + Structure FormBody extends Body ( + String field, + String content + ) + } +} \ No newline at end of file diff --git a/plugins/org.etsi.mts.tdl.library/src/org/etsi/mts/tdl/library/Standard.tdltx b/plugins/org.etsi.mts.tdl.library/src/org/etsi/mts/tdl/library/Standard.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..38829c358676ab4e79cd0d7cf73da571544bc05a --- /dev/null +++ b/plugins/org.etsi.mts.tdl.library/src/org/etsi/mts/tdl/library/Standard.tdltx @@ -0,0 +1,56 @@ +Package TDL { + //TODO: extract to standard library + Constraint length + Constraint minLength + Constraint maxLength + Constraint range + Constraint format + Constraint union + Constraint uniontype + + Type Boolean + Type Integer + Type String + Type Verdict + + //TODO: these do not work at present -> literal values take precedence? +// Boolean true +// Boolean false + Boolean True + Boolean False + + Verdict pass + Verdict fail + Verdict inconclusive + + Time second + + Annotation Master + Annotation MappingName + + //standard annotations for STO + Annotation Initial conditions + Annotation Expected behaviour + Annotation Final conditions + Annotation Test Purpose Description + Annotation when + Annotation then + + Predefined == returns Boolean + Predefined != returns Boolean + Predefined and returns Boolean + Predefined or returns Boolean + Predefined xor returns Boolean + Predefined not returns Boolean + Predefined < returns Boolean + Predefined > returns Boolean + Predefined <= returns Boolean + Predefined >= returns Boolean + Predefined + + Predefined - + Predefined * + Predefined / + Predefined mod + Predefined size returns Integer + +} \ No newline at end of file