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

Response Time ? #60

Closed
chrisvidal opened this issue Aug 5, 2016 · 8 comments
Closed

Response Time ? #60

chrisvidal opened this issue Aug 5, 2016 · 8 comments

Comments

@chrisvidal
Copy link

Is there a way to get the API response time while testing it ?
would be nice addon

@dareid dareid closed this as completed in 837e0cc Aug 6, 2016
@dareid
Copy link
Owner

dareid commented Aug 6, 2016

I just pushed a responsetime assertion, could you have a look and see what you think. Any feedback would be appreciated :)

@chrisvidal
Copy link
Author

wow, so awesome !
how shall i update with this new version ?

@dareid
Copy link
Owner

dareid commented Aug 6, 2016

At the moment it is not added to npm whilst u have a look.
You can get the latest version using a package dependency on the specific
commit hash. I am on my phone at the moment so can't get the exact form,
but documentation is here
https://docs.npmjs.com/files/package.json#github-urls

On 6 Aug 2016 11:06 a.m., "Chris" [email protected] wrote:

wow, so awesome !
how shall i update with this new version ?


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#60 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGtiwgyfsEMHsi_TlqkQqg9RWI4Pxc0Nks5qdFytgaJpZM4JdilF
.

@chrisvidal
Copy link
Author

chrisvidal commented Aug 8, 2016

alright thanks as per you dais, i managed to update with this specific commit updating my package.json like this
"devDependencies": { "chakram": "dareid/chakram#837e0cc0b9d1b8b84af01c1cf066c7bd2f772467" }

@chrisvidal
Copy link
Author

chrisvidal commented Aug 8, 2016

got an exception during the test:

  before(function () {
        chakram.clearRequestDefaults();
        return apiResponse =  chakram.get(testedUrl)
});

the test:

    it("responseTime should be below 750ms", function () {
        return expect(apiResponse.responseTime).to.exist.and.to.be.at.least(20).and.at.most(750);
      });

the exception

3) Not Authorized User Profile API responseTime should be below 750ms:
     AssertionError: expected undefined to exist
      at doAsserterAsyncAndAddThen (node_modules/chai-as-promised/lib/chai-as-promised.js:296:33)
      at .<anonymous> (node_modules/chai-as-promised/lib/chai-as-promised.js:286:25)
      at Object.defineProperty.get (node_modules/chai/lib/chai/utils/overwriteProperty.js:50:37)
      at Context.<anonymous> (spec/users/non_authenticated_user_assertions.js:45:51)

@chrisvidal
Copy link
Author

how could i get the responseTime in the report please ?
this is what actually interests my client, to get this responseTime value

@chrisvidal
Copy link
Author

is the responseTime feature pushed under the last npm version ?

@dareid
Copy link
Owner

dareid commented Aug 31, 2016

Not yet, I will aim to do a release at the weekend

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

No branches or pull requests

2 participants