Skip to content

Latest commit

 

History

History
80 lines (73 loc) · 2.09 KB

README.md

File metadata and controls

80 lines (73 loc) · 2.09 KB

msft-xl-graph-test

This test program uses MSFT Graph API for Excel to populate a set of input cells, which drives some calcualtion in the XL sheet and read the results from a set of output cells. The cells are hard-coded in the program (as this is intended for just test purposes).

In order to run the test a config file either in yaml or json format should be provided as input. THe structure of the yaml file is as shown below.

To get the workbookItemID you can search the one-drive using Graph API (via the graph-explorer) e.g. https://graph.microsoft.com/v1.0/me/drive/root/search(q='.xlsx')?select=name,id,webUrl

To run the test

msft-xl-graph-test run --config <path_to_config_file>

If the --config option is not specified the test looks for the config file under the HOME directory with the file name .msft-xl-graph-test.yaml.

accessToken: <access_token_from_graph_explorer>
workbookItemID: <workbookItemID_for_the_test_workbook>
noOfIterations: 5
inputParams:
  - memCnt: 230
    recCnt: 79
    curr: USD
  - memCnt: 1230
    recCnt: 79
    curr: CAD
  - memCnt: 12300
    recCnt: 260
    curr: GBP
  - memCnt: 36900
    recCnt: 749
    curr: EUR
  - memCnt: 2500
    recCnt: 441
    curr: AUD    
  - memCnt: 2500
    recCnt: 441
    curr: USD      

The equivalent JSON config file would be as follows

{
    "accessToken": "<access_token_from_graph_explorer>",
    "workbookItemID": "<workbookItemID_for_the_test_workbook>",
    "noOfIterations": 5,
    "inputParams": [
        {
            "memCnt": 230,
            "recCnt": 79,
            "curr": "USD"
        },
        {
            "memCnt": 1230,
            "recCnt": 79,
            "curr": "CAD"
        },
        {
            "memCnt": 12300,
            "recCnt": 260,
            "curr": "GBP"
        },
        {
            "memCnt": 36900,
            "recCnt": 749,
            "curr": "EUR"
        },
        {
            "memCnt": 2500,
            "recCnt": 441,
            "curr": "AUD"
        },
        {
            "memCnt": 2500,
            "recCnt": 441,
            "curr": "USD"
        }
    ]
}