App Developers: Using Scripting to Test Your App
Without Cytoscape Automation, writing integration tests for your app is very difficult -- apps are usually built to be executed using a keyboard and mouse, which means that testing apps is often difficult and error prone.
There are several advantages of this type of testing:
- It can involve code written by app users, themselves. Bug reporters can be encouraged to share code that replicates failure conditions, which can later be included as test cases.
- Tests written in non-compiled languages (e.g., Python) often can be modified and rerun quickly, which greatly reduces overall development time.
Hint: When creating tests, it is often handy to have the Cytoscape Swagger pages open in a browser (via Cytoscape's Help --> Automation --> CyREST API menu) so you can use the Try it now! button to easily experiment with operations, parameters, and results.
Tests such as these should be included in a clearly named directory in your app's root directory, and should shared in a public repository such as GitHub. This directory should include a README.md file clearly stating the intent of the tests and any necessary instructions on how to run them.
Comments should be provided in code to describe the tests and how they are to be executed.
Examples of integration tests can be found in some of our Sample Apps: