Commit 348041d8 authored by Hamza Baqa's avatar Hamza Baqa

Add some content to guide the user

parent d9993553
from utils.ioppytest_cli import ioppytest_cli
from collections import OrderedDict
from tabulate import tabulate
import os
......@@ -15,15 +16,57 @@ ui_reply = ioppytest_cli._amqp_request(req,'dummy_component')
session_user = ui_reply.users
session_user.remove('myslice')
print("================= The users of the sessions : ========================" + str(len(session_user)))
ioppytest_cli._ui_display_markdown_text_orc("Choose a testcase scenario",session_user[0])
val = dict(ioppytest_cli._ui_send_question_with_choices(session_user[0]))
if len(session_user) == 1:
if 'Conformance testing' in val:
ioppytest_cli._ui_display_markdown_text_orc("Then ontology validation takes place, adressing both syntactic and semantic validation.",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("The resulting RDF is checked against RDF model and specifications before proceeding the ontology validation. ",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc(tabulate([["N-Quads",".nq"],["N-Triples",".nt"],["N3",".n3"], ["Turtle",".ttl"], ["TriG",".trig"], ["TriX",".trix"],["RDF/JSON",".rj"],["JSON-LD",".jsonld"],["BinaryRDF",".brf"],["RDF/XML",".rdf"],["OWL",".owl"] ],headers=['Format Name', 'Extension'], tablefmt="grid"),session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("Popular RDF serialization formats are accepted as input thanks to an integrate parser",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("Please upload your semantic description to try it:-)",session_user[0])
os.system('python3 conf.py')
else:
ioppytest_cli._ui_display_markdown_text_orc("Choose a testcase scenario",session_user[0])
val = dict(ioppytest_cli._ui_send_question_with_choices(session_user[0]))
if 'User to User' in val:
if 'User to User' in val:
if len(session_user) == 1:
ioppytest_cli._ui_display_markdown_text_orc("""o The communication levels check to validate the correct reception of messages.
o The lexical/format level check to validate the format serialization/deserialization of the semantic descriptions of both users.
o The data processing level check to determine whether the two semantic descriptions understand the data in the same way. """,session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("The following aspects need to be validated:",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("Interoperability testing: to check if two parties understand correctly the exchanged semantic data.",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("There is only one user on the session, please share it (click on share button)",session_user[0])
else:
ioppytest_cli._ui_display_markdown_text_orc("""o The communication levels check to validate the correct reception of messages.
o The lexical/format level check to validate the format serialization/deserialization of the semantic descriptions of both users.
o The data processing level check to determine whether the two semantic descriptions understand the data in the same way. """,session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("The following aspects need to be validated:",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("Interoperability testing: to check if two parties understand correctly the exchanged semantic data.",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc(tabulate([["N-Quads",".nq"],["N-Triples",".nt"],["N3",".n3"], ["Turtle",".ttl"], ["TriG",".trig"], ["TriX",".trix"],["RDF/JSON",".rj"],["JSON-LD",".jsonld"],["BinaryRDF",".brf"],["RDF/XML",".rdf"],["OWL",".owl"] ],headers=['Format Name', 'Extension'], tablefmt="grid"),session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("Popular RDF serialization formats are accepted as input thanks to an integrate parser",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("Please upload your semantic description to try it:-)",session_user[0])
os.system('python3 u2u.py')
elif 'SUT to SUT' in val:
os.system('python3 s2s.py')
\ No newline at end of file
if 'SUT to SUT' in val:
if len(session_user) == 1:
ioppytest_cli._ui_display_markdown_text_orc("""o The communication levels check to validate the correct reception of messages.
o The lexical/format level check to validate the format serialization/deserialization
of the exchanged messages between two systems.
o The data processing level check to determine whether the two systems understand the data in the same way. """,session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("The following aspects need to be validated:",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("Interoperability testing: to check if two parties understand correctly the exchanged semantic data.",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("There is only one user on the session, please share it (click on share button)",session_user[0])
else:
os.system('python3 s2s.py')
ioppytest_cli._ui_display_markdown_text_orc("""o The communication levels check to validate the correct reception of messages.
o The lexical/format level check to validate the format serialization/deserialization
of the exchanged messages between two systems.
o The data processing level check to determine whether the two systems
understand the data in the same way. """,session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("The following aspects need to be validated:",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("Interoperability testing: to check if two parties understand correctly the exchanged semantic data.",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("Popular RDF serialization formats are accepted as input thanks to an integrate parser",session_user[0])
ioppytest_cli._ui_display_markdown_text_orc("Please enter the location of your TRIPLE STORE (a server with SPARQL entrypoint) to try it :-)",session_user[0])
......@@ -243,7 +243,15 @@ def _ui_send_question_with_choices(user_id):
"""
msg = MsgUiRequestQuestionRadio()
msg.fields = [{
msg.fields = [
{
"name": "Conformance testing",
"type": "radio",
"value": True
},
{
"name": "User to User",
"type": "radio",
"value": True
......@@ -329,6 +337,7 @@ def _ui_display_markdown_text_orc(text,user_id):
_publish_message(msg)
@cli.command()
def clear():
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment