Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming unit tests - unittests.json #9

Open
daltskin opened this issue May 6, 2020 · 1 comment
Open

Naming unit tests - unittests.json #9

daltskin opened this issue May 6, 2020 · 1 comment
Labels
P2 Nice to have

Comments

@daltskin
Copy link
Collaborator

daltskin commented May 6, 2020

I can't find the schema for the unittests.json at https://github.com/microsoft/NLU.DevOps, what I was hoping to find was if there was the ability to name a unit test - this is best practice to help both understand what the unit test is doing, the expected outcome, and as a handler to discuss any problematic results.

Having a play around with the file - it looks like the dotnet nlu test tool will ignore the "name" attribute and still run the tests successfully. Therefore, we can deduce that we can name each test :)

Depending on whatever naming convention is decided, here is an example:

 {
    "name": "VacationRequest_RequestVacationIntent_StartDate_July23_EndDate_August13",
    "text": "i want paid time off from july 23 to august 13",
    "intent": "RequestVacation",
    "entities": [
      {
        "entityType": "vacation-request",
        "entityValue": {
          "leave-type": [
            [
              "paid"
            ]
          ],
          "date-range": [
            {
              "type": "daterange",
              "values": [
                {
                  "timex": "(XXXX-07-23,XXXX-08-13,P21D)",
                  "start": "2019-07-23",
                  "end": "2019-08-13"
                },
                {
                  "timex": "(XXXX-07-23,XXXX-08-13,P21D)",
                  "start": "2020-07-23",
                  "end": "2020-08-13"
                }
              ]
            }
          ]
        },
        "matchText": "paid time off from july 23 to august 13"
      }
    ],
    "intents": [
      {
        "intent": "RequestVacation"
      }
    ]
  }
@daltskin
Copy link
Collaborator Author

daltskin commented May 6, 2020

This can apply for the verificationtests.json too

@AndyCW AndyCW added the P2 Nice to have label May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Nice to have
Projects
None yet
Development

No branches or pull requests

2 participants