简体   繁体   中英

Is :TEXT a valid format for a KRL datasource?

The docs mention:XML, :JSON, and:HTML, but I have a URL that returns plain text. I'd like to write

global {
  datasource tests_executed:TEXT <- "http://saucelabs.com/rest/v1/info/counter"
}
rule how_many_tests {
  pre {
    count = datasource:tests_executed("");
    msg = "Executed #{count} tests.";
  }
  notify("Saucelabs",msg) with sticky=true;
}

Are:XML, :JSON, and:HTML the only valid formats for a datasource?

XML, JSON, and HTML are the only current valid formats but if the Kynetx engine isn't able to parse the datasource as that format, it treats it as a string.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM