Skip to content

App Developers: Exercising Your App

Barry Demchak edited this page Jul 8, 2017 · 1 revision

As you add Cytoscape Automation features to your app, you will likely want to exercise your new Commands and Functions casually, without having to write a script or program.

There are several ways to do this, as described in Trying Automation.

This page uses Trying Automation as a starting point, and gives additional advice pertinent to app developers hoping to exercise new Commands and Functions. For a discussion on using Cytoscape Automation to create app test suites, see Using Scripting to Test Your App.

For accessing Commands and Functions through scripts, see the FAQ.

Execution Requirements

In addition to first starting Cytoscape, you must have loaded your app into Cytoscape.

If your app is already in the Cytoscape app store, be sure you have downloaded and installed it using the Cytoscape App Manager.

Otherwise, be sure you install it as a local JAR using the Cytoscape App Manager's Install from File button.

Accessing through Cytoscape's Swagger UI

Cytoscape's Swagger UI provides an excellent environment for discovering Function and Command documentation and trying a Function or Command directly, as described in Trying Automation.

Note that if you have not annotated your app Commands and Functions, the Swagger pages for your app will be present but will have minimal information, and may not enable parameter entry. To solve this, add Swagger annotations to your app Commands and Functions, reinstall your app in Cytoscape, and reload Swagger in your browser. As you add Swagger annotations to your app, its Swagger page will show more parameters so the Try it out! button can help you exercise more and more functionality.

Accessing through a Web Browser

As described in Trying Automation, a Command or Function can be exercised directly from your browser's address bar.

Note that this applies to all Commands (which are called using HTTP GET) and whichever Functions you have defined to respond to HTTP GET. Functions that respond to HTTP POST, PUT, DELETE and so on cannot be exercised via a web browser address bar -- the Swagger UI and REST clients enable you to exercise these functions.

Accessing through a REST Client

As described in Trying Automation, REST clients provide the most functionality and features, but also require a good understanding of the HTTP protocol. If you are not already comfortable with the HTTP protocol, you can use REST clients to learn much more.