scenarioo / scenarioo-format

Specification of the next generation Scenarioo documentation format (for version 3.0 and upwards)
http://www.scenarioo.org
GNU Lesser General Public License v3.0
0 stars 2 forks source link

How should we specify the type (use case, scenario, etc.) in our JSON files? #3

Closed adiherzog closed 9 years ago

adiherzog commented 9 years ago

Variant 1: Map with one key as top level element

{
    "useCase" : {
        "name" : "Find Page",
        "description" : "User wants to search for a page and read it.",
        "details" : {
            "Webtest Class" : "org.scenarioo.uitest.example.testcases.FindPageUITest"
        },
        "labels" : [
            "public"
        ]
    }
}

Variant 2: Map with all the keys as top level element, additional type field

The cool thing about this is the fact, that the type / name fields look exactly the same as they look in the "object repository" objects in the metadata.

{
    "type" : "useCase",
    "name" : "Find Page",
    "description" : "User wants to search for a page and read it.",
    "details" : {
        "Webtest Class" : "org.scenarioo.uitest.example.testcases.FindPageUITest"
    },
    "labels" : [
        "public"
    ]
}

Variant 3: No explicit type in the file, derive type from file name / file location

This is the variant with the least redundancy.

{
    "name" : "Find Page",
    "description" : "User wants to search for a page and read it.",
    "details" : {
        "Webtest Class" : "org.scenarioo.uitest.example.testcases.FindPageUITest"
    },
    "labels" : [
        "public"
    ]
}
adiherzog commented 9 years ago

@bruderol @tobiaszuercher Please let me know what you think about this question.

I currently prefer variant 3, because it is always clear from the file location and the file name what type it is.

tobiaszuercher commented 9 years ago

i agree with you: 3. option!

only when we embedd a usecase in another document, then we should use "usecase": { .... }. this is probably not going to happen, but maybe with the details objects.

adiherzog commented 9 years ago

Ok, I changed it to the 3rd option and will close this issue.