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

Adding scripted browser monitor for newrelic synthetics monitoring #584

Closed
wants to merge 24 commits into from

Conversation

joeaero19
Copy link
Collaborator

@joeaero19 joeaero19 commented Oct 26, 2022

Purpose

This PR adds scripted browser monitor for newrelic synthetics monitoring.

Linked Issues to Close

Closes #583

Approach

This change implement the newrelic synthetics monitor(scripted browser) through the syhthtetic api.

Pull Request Creator Checklist

  • This PR has an associated issue or issues.
  • The associated issue(s) are linked above.
  • This PR meets all acceptance criteria for those issues.
  • This PR and linked issue(s) are adequately documented
  • This PR and linked issues(s) are a complete description of the changeset; an individual or team should be able to understand the issue(s) and changes by reading through this PR and it's links, with no further interaction.
  • Someone has been assigned this PR.
  • At least one person has been marked as reviewer on this PR.

Pull Request Reviewer/Assignee Checklist

  • This PR has an associated issue or issues.
  • The associated issue(s) are linked above.
  • This PR meets all acceptance criteria for those issues.
  • This PR and linked issue(s) are adequately documented
  • This PR and linked issues(s) are a complete description of the changeset; an individual or team should be able to understand the issue(s) and changes by reading through this PR and it's links, with no further interaction.

.then(function () {})
// Test Case: login-test
.then(function () {
return Promise.resolve(true)
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

(console.log(
`Step ${a}: ${o} FINISHED. It took ${_}ms to complete. testCase=${i}`
),
t && n.length > 0
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

endTestCase: function (e = "") {
var i = Date.now() - r - s;
console.log(`Step ${a}: ${o} FINISHED. It took ${i}ms to complete.`),
t && n.length > 0
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

const By = $driver.By;
const browser = $browser.manage();
var vars = new Map();
const logger = (function ({
Copy link

Choose a reason for hiding this comment

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

Function logger has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.

@codeclimate
Copy link

codeclimate bot commented Oct 26, 2022

Code Climate has analyzed commit 8aa2419 and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1
Duplication 3

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 24.4% (0.0% change).

View more on Code Climate.

@joeaero19 joeaero19 self-assigned this Oct 26, 2022
@joeaero19 joeaero19 closed this Oct 27, 2022
@joeaero19 joeaero19 deleted the ish-synthetics branch October 27, 2022 15:29
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.

Add scripted browser monitor for newrelic synthetics monitoring
1 participant