Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| integration [2021/02/17 19:07] – [Jenkins] admin | integration [2024/01/02 22:46] (current) – [Integration with External Tools] admin | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| * [[#Cloud Services]] | * [[#Cloud Services]] | ||
| - | * [[# | ||
| - | * [[# | ||
| * [[#Azure DevOps]] | * [[#Azure DevOps]] | ||
| * [[#REST APIs]] | * [[#REST APIs]] | ||
| - | | + | * [[plugins# |
| - | * [[# Integrate TestOptimal in your web project (javascript/ | + | |
| - | | + | |
| ---- | ---- | ||
| Line 22: | Line 18: | ||
| ---- | ---- | ||
| - | ==== Requirements ==== | ||
| - | You can bring in requirements from external files or //ALM// systems like [[#Jira]] and [[#Azure ALM]]. | ||
| - | === Jira === | ||
| - | * config.properties: | ||
| - | ALM.req.class=com.testoptimal.alm.JiraConnect | ||
| - | ALM.jira.auth.basic.username=xxx | ||
| - | ALM.jira.auth.basic.password=xxx | ||
| - | ALM.jira.auth.type=Basic | ||
| - | ALM.jira.req.query={" | ||
| - | ALM.jira.req.url=http\:// | ||
| - | |||
| - | * IDE / Requirement / Parameters: | ||
| - | |||
| - | { " | ||
| - | |||
| - | === Azure ALM === | ||
| - | * config.properties: | ||
| - | |||
| - | ALM.req.class=com.testoptimal.alm.AzureConnect | ||
| - | ALM.azure.auth.basic.username=xxx | ||
| - | ALM.azure.auth.basic.password=ww6k...rj6klsvq | ||
| - | ALM.azure.auth.type=Basic | ||
| - | ALM.azure.req.url=https\:// | ||
| - | |||
| - | * IDE / Requirement / Parameters: | ||
| - | |||
| - | | ||
| - | " | ||
| - | } | ||
| - | |||
| - | === Authentication === | ||
| - | Besides //Basic//, additional authentications are possible. Below is the list of authentication options: | ||
| - | * BASIC | ||
| - | * ALM.' | ||
| - | * ALM.' | ||
| - | * FORM | ||
| - | * ALM.' | ||
| - | * ALM.' | ||
| - | * OAUTH | ||
| - | * ALM.' | ||
| - | * ALM.' | ||
| - | * ALM.' | ||
| - | * ALM.' | ||
| - | * OAUTH2 | ||
| - | * ALM.' | ||
| - | * ALM.' | ||
| - | |||
| - | ---- | ||
| - | ==== Jenkins ==== | ||
| - | For current version v6, you would use REST API documented at http:// | ||
| - | |||
| - | For V5, add steps to [[https:// | ||
| - | |||
| - | * Install [[https:// | ||
| - | * Add //admin// to connect to [[runtime_server | Runtime Servers]] | ||
| - | * select menu //Jenkins / Credentials// | ||
| - | * click " | ||
| - | * fill out form and save | ||
| - | * open /create build job | ||
| - | * add a build step with //HTTP Request// plugin | ||
| - | |||
| - | {{ wiki: | ||
| - | |||
| - | * click " | ||
| - | |||
| - | {{ wiki: | ||
| - | |||
| - | * click " | ||
| - | |||
| - | Run the job and you should see the output in Job Console Output: | ||
| - | |||
| - | {{ wiki: | ||
| - | |||
| - | |||
| - | ---- | ||
| ==== Azure DevOps ==== | ==== Azure DevOps ==== | ||
| Line 108: | Line 29: | ||
| // | // | ||
| - | You can use these REST APIs to access start and stop model execution, access model artifacts/ | + | You can use these REST APIs as documented at http:// |
| ==== Organization of REST APIs ==== | ==== Organization of REST APIs ==== | ||
| REST APIs are grouped and organized in these categories (to match Swagger-UI): | REST APIs are grouped and organized in these categories (to match Swagger-UI): | ||
| - | * ALM - ALM source definition and model requirements | ||
| - | * Agent - TestOptimal Agent APIs: register remote agent and receive agent commands | ||
| - | * Client - TestOptimal Agent APIs: remote execute model and data set execution | ||
| * Dashboard - Dashboard data: KPI and model execution statistics | * Dashboard - Dashboard data: KPI and model execution statistics | ||
| * Demo - REST API used by demo models | * Demo - REST API used by demo models | ||
| Line 120: | Line 38: | ||
| * Graph - generate / download graphs for model executions: model graph, coverage graph, traversal graph and test case graph (MSC) | * Graph - generate / download graphs for model executions: model graph, coverage graph, traversal graph and test case graph (MSC) | ||
| * Model - access to model artifacts/ | * Model - access to model artifacts/ | ||
| - | * Report - Dashboard reports | ||
| - | * Runtime - start/stop model execution | ||
| - | * Security - user login | ||
| * Stats - model execution statistics | * Stats - model execution statistics | ||
| - | * SvrMgr - Server manager functions | ||
| * System - perform system functions | * System - perform system functions | ||
| - | * web-redirect-controller - internal use | ||
| ==== Security and Authorization ==== | ==== Security and Authorization ==== | ||
| Line 144: | Line 57: | ||
| ---- | ---- | ||
| - | ==== Integrate TestOptimal in your java project (Java /IDE Connector) ==== | ||
| - | // | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | </ | ||
| - | |||
| - | You can build your model using POJO java classes and submit it to // | ||
| - | |||
| - | You can generate test cases for state model and data set (combinatorial testing). | ||
| - | |||
| - | See [[http:// | ||
| - | |||
| - | ==== Integrate TestOptimal in your web project (javascript/ | ||
| - | You may integrate your web project with // | ||
| - | |||
| - | For web/ | ||
| - | <script src=" | ||
| - | <script src=" | ||
| - | |||
| - | For //Node.js// project, use following npm command to install // | ||
| - | npm install @testoptimal/ | ||
| - | |||
| - | |||
| - | === Connecting to TestOptimal Server === | ||
| - | TOSvr = new TOServer(" | ||
| - | | ||
| - | | ||
| - | .then(() => { | ||
| - | console.logMsg(" | ||
| - | }, (err) => { | ||
| - | console.logMsg(err); | ||
| - | alert(" | ||
| - | }); | ||
| - | |||
| - | === State Model Sample Scripts === | ||
| - | |||
| - | |||
| - | == Creating State Model == | ||
| - | var model = new Model (" | ||
| - | var Welcome = model.addStateInitial(" | ||
| - | var Q1 = model.addState(" | ||
| - | var Q2 = model.addState(" | ||
| - | var Q3 = model.addState(" | ||
| - | var Q4 = model.addState(" | ||
| - | var ThankYou = model.addStateFinal(" | ||
| - | |||
| - | Welcome.addTrans(" | ||
| - | Q1.addTrans(" | ||
| - | Q2.addTrans(" | ||
| - | Q3.addTrans(" | ||
| - | Q4.addTrans(" | ||
| - | |||
| - | // TOSvr is the connection object created in Making Connection section above. | ||
| - | TOSvr.uploadModel(model).then (function(){alert(" | ||
| - | |||
| - | == Generating Test Cases == | ||
| - | TOSvr.genPaths(" | ||
| - | function printPaths (sum) { | ||
| - | | ||
| - | } | ||
| - | |||
| - | == Opening Graphs == | ||
| - | // graph types: model, sequence, msc and coverage | ||
| - | // except model graph, all other graphs are available for model execution. | ||
| - | var url = TOSvr.getGraphURL(" | ||
| - | console.logMsg(" | ||
| - | window.open(url, | ||
| - | |||
| - | == Online MBT == | ||
| - | var execReq = { | ||
| - | modelName: | ||
| - | statDesc: " | ||
| - | options: { " | ||
| - | }; | ||
| - | var agentID = " | ||
| - | TOSvr.execModel(execReq).then((data) => { | ||
| - | console.logMsg(data); | ||
| - | console.logMsg(" | ||
| - | TOSvr.regAgent(execReq.modelName, | ||
| - | }); | ||
| - | |||
| - | function getNextCmd() { | ||
| - | | ||
| - | if (rmtCmd && rmtCmd.cmd) { | ||
| - | var result = { | ||
| - | result: "I don't know", | ||
| - | reqTag: " | ||
| - | assertID: | ||
| - | } | ||
| - | console.logMsg(" | ||
| - | console.logMsg(" | ||
| - | TOSvr.setResult (agentID, result).then (function(ret) { | ||
| - | setTimeout(getNextCmd, | ||
| - | }, errHandler); | ||
| - | } | ||
| - | else modelExecDone(); | ||
| - | }, errHandler); | ||
| - | } | ||
| - | |||
| - | function modelExecDone() { | ||
| - | | ||
| - | }function errHandler (err) { | ||
| - | | ||
| - | | ||
| - | | ||
| - | } | ||
| - | |||
| - | == Retrieve Execution Results == | ||
| - | | ||
| - | |||
| - | === Combinatorial Model Sample Scripts === | ||
| - | |||
| - | == Create DataSet == | ||
| - | var ds = new DataSet(" | ||
| - | ds.addField (" | ||
| - | ds.addField (" | ||
| - | TOSvr.uploadDataSet (ds).then(console.logMsg, | ||
| - | |||
| - | == Generate Test Cases == | ||
| - | | ||
| - | |||
| - | |||
| - | === Demo Web Client === | ||
| - | You may try out above sample scripts with the web client bundled in // | ||
| - | |||
| - | http:// | ||