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

Add: Functional tests suite #1525

Merged
merged 15 commits into from
Nov 22, 2023
Merged

Add: Functional tests suite #1525

merged 15 commits into from
Nov 22, 2023

Conversation

mapedraza
Copy link
Collaborator

This PR includes the functional test suite included in PR telefonicaid/iotagent-json#769

After some internal discussions, this suite was ported to IoTA Lib

@fgalan
Copy link
Member

fgalan commented Nov 13, 2023

This PR includes the functional test suite included in PR telefonicaid/iotagent-json#769

After some internal discussions, this suite was ported to IoTA Lib

So PR telefonicaid/iotagent-json#769 should be closed?

@mapedraza
Copy link
Collaborator Author

This PR includes the functional test suite included in PR telefonicaid/iotagent-json#769
After some internal discussions, this suite was ported to IoTA Lib

So PR telefonicaid/iotagent-json#769 should be closed?

No, It should be adapted, in a manner that it can use util files and other stuff in the agent, so same tests can be executed (using same case definitions) but running in the agent. This PR should be merged first.

test/functional/README.md Outdated Show resolved Hide resolved
test/functional/README.md Outdated Show resolved Hide resolved
@@ -0,0 +1,372 @@
## Functional test suite
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test/functional/README.md file should be linked in the root README.md file, from the right place.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added here: 05b86a5

test/functional/README.md Outdated Show resolved Hide resolved
/* eslint-disable no-unused-vars*/
/* eslint-disable no-unused-expressions*/

// const iotaJson = require('../../lib/iotagent-json');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed here: 05b86a5

/* eslint-disable no-unused-vars*/
/* eslint-disable no-unused-expressions*/

// const iotaJson = require('../..');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed here: 05b86a5

@@ -0,0 +1,1641 @@
const config = require('./config-test.js');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License header should be included.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added here: 05b86a5

},
{
describeName: '0110 - Simple group with active attributes + JEXL multiples expressions at same time',
skip: 'lib', // Explanation in #1523
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solving #1523 would remove this skip?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

expect(response.body, ERR_MEAS_BODY).to.be.empty;
} else {
const response = await sendMeasureIotaLib(measure, provision);
// expect(response, ERR_MEAS_BODY).to.be.empty;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lefover comment? Or something pending to fix?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved here: 05b86a5

const testCases = [
// BASIC TESTS
{
describeName: '0010 - Simple group without attributes',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest a similar apporach than in CB test cases.

  • The number identifies the issue number associated to the test
  • For those tests not associated to specific issue (as the "starting ones"), let's use 0000

Copy link
Member

@AlvaroVega AlvaroVega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

test/functional/README.md Outdated Show resolved Hide resolved
test/functional/README.md Outdated Show resolved Hide resolved
test/functional/README.md Outdated Show resolved Hide resolved
Co-authored-by: Fermín Galán Márquez <[email protected]>
Copy link
Member

@fgalan fgalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fgalan fgalan merged commit ddc759c into master Nov 22, 2023
8 checks passed
@fgalan fgalan deleted the task/add-functional-tests branch November 22, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants