Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write integration tests #66

Open
jmarcosfer opened this issue Aug 17, 2021 · 0 comments
Open

Write integration tests #66

jmarcosfer opened this issue Aug 17, 2021 · 0 comments
Labels
Projects

Comments

@jmarcosfer
Copy link
Collaborator

jmarcosfer commented Aug 17, 2021

Description

Add integration tests for the library's algorithms. Assume that the upstream Essentia, from which Essentia.js is built, is already tested. Thus, these integration tests should check that the JS part (wrapper) is working correctly.

However, this could include unit tests as a prior step, to ensure that the Emscripten transpilation process (c++ –> WASM) doesn't negatively affect algorithms' output or render some of them unusable.

How?

Consider creating basic unit tests as a prior step to compare JS algorithm outputs to Python algorithm outputs as a kind of regression testing. These tests could be generated automatically from code_generator.py, then the results saved to file for comparison with another smaller script.

Do this first set of tests on Node.js
E. g. https://github.com/avajs/ava

Types

Most of these test should probably ensure one of two things:

  • that algorithm method calls don't produce any exceptions,
  • that types are treated correctly and algorithms throw when wrong types are given

For reference, these are the types in included algorithms:
param types: ['integer', 'real', 'string', 'vector_real', 'bool']
input types: ['vector_real', 'real', 'vector_vector_real', 'vector_string', 'string']
output types: ['real', 'vector_real', 'vector_vector_real', 'integer', 'string', 'vector_string']
So tests should consider cases for these types (as param, input, and output types).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants