Compare commits
28 Commits
d200af6bd2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a90d03c4d0 | |||
| a6862543d2 | |||
| 0ec7e1e93a | |||
| 60cc20904e | |||
| 5e04bde2f1 | |||
| ea6e5361be | |||
| e6cae41b78 | |||
| 3396020d5f | |||
| a2b887967f | |||
| 46cac98fb4 | |||
| bc05013472 | |||
| be9bd465af | |||
| de9d1b6c27 | |||
| c572d61a00 | |||
| 4cf278464e | |||
| 946ad9f155 | |||
| 89e4981193 | |||
| bfe7987d05 | |||
| f2ace3c7df | |||
| cbcb227d80 | |||
| 1b53c56015 | |||
| 9422c8b570 | |||
| 8dca917552 | |||
| a1462b51d2 | |||
| 25cdc5e52c | |||
| f00ab5b194 | |||
| 96b568c305 | |||
| 19941b9dab |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/e2e/.abort-run
|
||||||
13
e2e/.gitignore
vendored
Normal file
13
e2e/.gitignore
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Dependencies
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Cypress
|
||||||
|
cypress/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.vscode/settings.json
|
||||||
|
|
||||||
|
# OS
|
||||||
|
Thumbs.db
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
16
e2e/.vscode/tasks.json
vendored
Normal file
16
e2e/.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "npm",
|
||||||
|
"script": "open",
|
||||||
|
"problemMatcher": [],
|
||||||
|
"label": "npm: open",
|
||||||
|
"detail": "./node_modules/.bin/cypress open",
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
const { defineConfig } = require('cypress')
|
|
||||||
|
|
||||||
module.exports = defineConfig({
|
|
||||||
defaultCommandTimeout: 5000,
|
|
||||||
xxxretries: 3,
|
|
||||||
xbaseUrl: 'http://localhost:7575',
|
|
||||||
xxxbaseUrl: 'http://localhost:8080',
|
|
||||||
video: false,
|
|
||||||
env: {
|
|
||||||
xapiBaseUrl: 'http://localhost:7575/api/v8.0/',
|
|
||||||
xxapiBaseUrl: 'https://test.onayanova.com/api/v8.0/',
|
|
||||||
apiBaseUrl: 'https://3312.onayanova.com/api/v8.0/',
|
|
||||||
admin: {
|
|
||||||
login: 'superuser',
|
|
||||||
password: 'l3tm3in',
|
|
||||||
},
|
|
||||||
accounting: {
|
|
||||||
login: 'Accounting',
|
|
||||||
password: 'Accounting',
|
|
||||||
},
|
|
||||||
service: {
|
|
||||||
login: 'Service',
|
|
||||||
password: 'Service',
|
|
||||||
},
|
|
||||||
customer: {
|
|
||||||
login: 'Customer',
|
|
||||||
password: 'Customer',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
e2e: {
|
|
||||||
// We've imported your old cypress plugins here.
|
|
||||||
// You may want to clean this up later by importing these.
|
|
||||||
setupNodeEvents(on, config) {
|
|
||||||
return require('./cypress/plugins/index.js')(on, config)
|
|
||||||
},
|
|
||||||
specPattern: 'tests/**/*.cy.{js,jsx,ts,tsx}',
|
|
||||||
supportFile: 'support/e2e.js',
|
|
||||||
xxbaseUrl: 'https://test.onayanova.com',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
20
e2e/cypress.json
Normal file
20
e2e/cypress.json
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"defaultCommandTimeout": 5000,
|
||||||
|
"video": false,
|
||||||
|
"baseUrl": "http://localhost:8080",
|
||||||
|
"integrationFolder": "tests/regression",
|
||||||
|
"testFiles": "**/*.cy.{js,jsx,ts,tsx}",
|
||||||
|
"supportFile": "support/e2e.js",
|
||||||
|
"pluginsFile": "plugins/index.js",
|
||||||
|
"env": {
|
||||||
|
"expectedServerVersion": "8.2.4",
|
||||||
|
"apiBaseUrl": "http://localhost:7575/api/v8.0/",
|
||||||
|
"REMOTE_BASE_URL": "https://devtest.onayanova.com/",
|
||||||
|
"REMOTE_API_URL": "https://devtest.onayanova.com/api/v8.0/",
|
||||||
|
"admin": { "login": "superuser", "password": "l3tm3in" },
|
||||||
|
"accounting": { "login": "Accounting", "password": "Accounting" },
|
||||||
|
"service": { "login": "Service", "password": "Service" },
|
||||||
|
"customer": { "login": "Customer", "password": "Customer" },
|
||||||
|
"bizadmin": { "login": "BizAdmin", "password": "BizAdmin" }
|
||||||
|
}
|
||||||
|
}
|
||||||
4
e2e/local-run.bat
Normal file
4
e2e/local-run.bat
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
./node_modules/.bin/cypress run --browser chrome --config baseUrl=http://localhost:8080 --env apiBaseUrl=http://localhost:7575/api/v8.0/
|
||||||
|
rem ./node_modules/.bin/cypress run --browser electron --config baseUrl=http://localhost:8080 --env apiBaseUrl=http://localhost:7575/api/v8.0/
|
||||||
|
rem ./node_modules/.bin/cypress run --browser firefox --spec .\tests\regression\*.js --no-exit
|
||||||
|
|
||||||
@@ -1,15 +1,14 @@
|
|||||||
|
test change for git test
|
||||||
|
I think the best course from here is to pick through the UI and find if there is anything further worth testing due to it's uniqueness and fragility when refactoring.
|
||||||
|
honestly though this may be enough to move to the next stage
|
||||||
|
|
||||||
todo: test all current smoke, upload and test on devops
|
- Test that confirms the version of the server on the login page is as expected this is so that can be used to test a hosted droplet test server and will ensure it has been updated and correct new build is being tested
|
||||||
|
- Need a way to simplify testing local dev vs online, so can have two separate batch files and just run whichever one required so when release can test locally first then during deployment of installs test one final time on devtest
|
||||||
todo: missing smoke tests:
|
- also include the version to test against in the command line as well. Put it in the pre-data generation and erasure block so it just aborts right away without modifying anything. Maybe just looks at the login page itself
|
||||||
path: "/viewreport",
|
|
||||||
|
|
||||||
|
|
||||||
npm install --save-dev cypress@9.2.1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=-=-=-=-=-=-=-=-=-=-=-=-
|
||||||
|
From the olden times years ago:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -17,12 +16,8 @@ npm install --save-dev cypress@9.2.1
|
|||||||
|
|
||||||
todo: meter reading table click on item to confirm item page no other way to easily get id of unit metered unless create it or something
|
todo: meter reading table click on item to confirm item page no other way to easily get id of unit metered unless create it or something
|
||||||
|
|
||||||
|
|
||||||
TODO: high priority grid sort and filter test that excercises *all* options and filter types
|
TODO: high priority grid sort and filter test that excercises *all* options and filter types
|
||||||
this one will be hugely important as part of regression test as it was a constant source of issues in v7
|
this one will be hugely important as part of regression test as it was a constant source of issues in v7
|
||||||
todo: drawing signature test might work with this code:
|
|
||||||
|
|
||||||
cy.get('.main-canvas').trigger('mousedown', 500, 100, { force: true }).trigger('mousemove', 500, 200, { force: true }).trigger('mouseup', { force: true });
|
|
||||||
|
|
||||||
Service user features work
|
Service user features work
|
||||||
sb self contained and use standard test data because will also want to run without accounting prior
|
sb self contained and use standard test data because will also want to run without accounting prior
|
||||||
@@ -30,9 +25,7 @@ Inventory User features work
|
|||||||
OPS featurs work
|
OPS featurs work
|
||||||
Data filters work
|
Data filters work
|
||||||
form customize works
|
form customize works
|
||||||
Report printing works
|
|
||||||
going to be interesting to validate a pdf document, download I guess or look on screen for something??
|
|
||||||
also it's a popup so...?
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1476
e2e/package-lock.json
generated
Normal file
1476
e2e/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
|||||||
"test": "tests"
|
"test": "tests"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cypress": "^10.7.0"
|
"cypress": "^9.7.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"open": "./node_modules/.bin/cypress open",
|
"open": "./node_modules/.bin/cypress open",
|
||||||
@@ -17,5 +17,8 @@
|
|||||||
"smoke-chrome": "./node_modules/.bin/cypress run --browser chrome --spec ./tests/regression/1-smoke/*.js"
|
"smoke-chrome": "./node_modules/.bin/cypress run --browser chrome --spec ./tests/regression/1-smoke/*.js"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC"
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"fs.promises": "^0.1.2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
45
e2e/plugins/index.js
Normal file
45
e2e/plugins/index.js
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
const fs = require('fs')
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
|
const ABORT_FLAG_PATH = path.join(__dirname, '..', '.abort-run')
|
||||||
|
|
||||||
|
module.exports = (on, config) => {
|
||||||
|
on('before:browser:launch', (browser, launchOptions) => {
|
||||||
|
if (browser.name === 'chrome') {
|
||||||
|
launchOptions.args.push('--disable-gpu')
|
||||||
|
launchOptions.args.push('--no-sandbox')
|
||||||
|
launchOptions.args.push('--disable-dev-shm-usage')
|
||||||
|
}
|
||||||
|
return launchOptions
|
||||||
|
})
|
||||||
|
|
||||||
|
// If a TARGET_ENV env var was passed, override baseUrl and apiBaseUrl
|
||||||
|
if (config.env.TARGET_ENV === 'remote') {
|
||||||
|
config.baseUrl = config.env.REMOTE_BASE_URL
|
||||||
|
config.env.apiBaseUrl = config.env.REMOTE_API_URL
|
||||||
|
}
|
||||||
|
|
||||||
|
// Task to set abort flag
|
||||||
|
on('task', {
|
||||||
|
setAbortFlag() {
|
||||||
|
fs.writeFileSync(ABORT_FLAG_PATH, 'ABORTED')
|
||||||
|
return null
|
||||||
|
},
|
||||||
|
checkAbortFlag() {
|
||||||
|
return fs.existsSync(ABORT_FLAG_PATH)
|
||||||
|
},
|
||||||
|
clearAbortFlag() {
|
||||||
|
if (fs.existsSync(ABORT_FLAG_PATH)) {
|
||||||
|
fs.unlinkSync(ABORT_FLAG_PATH)
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Clean up abort flag at start of run
|
||||||
|
if (fs.existsSync(ABORT_FLAG_PATH)) {
|
||||||
|
fs.unlinkSync(ABORT_FLAG_PATH)
|
||||||
|
}
|
||||||
|
|
||||||
|
return config
|
||||||
|
}
|
||||||
5
e2e/remote-run.bat
Normal file
5
e2e/remote-run.bat
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
rem ./node_modules/.bin/cypress run --browser electron --config baseUrl=https://devtest.onayanova.com/ --env TARGET_ENV=remote
|
||||||
|
rem ./node_modules/.bin/cypress run --browser "C:\Program Files\Google\Chrome\Application\chrome.exe" --config baseUrl=https://devtest.onayanova.com/ --env TARGET_ENV=remote
|
||||||
|
./node_modules/.bin/cypress run --browser chrome --config baseUrl=https://devtest.onayanova.com/ --env TARGET_ENV=remote
|
||||||
|
rem ./node_modules/.bin/cypress run --browser firefox --spec .\tests\regression\*.js --no-exit
|
||||||
|
rem ./node_modules/.bin/cypress run --browser chrome --no-exit
|
||||||
@@ -1,24 +1,15 @@
|
|||||||
// ***********************************************************
|
|
||||||
// This example support/index.js is processed and
|
|
||||||
// loaded automatically before your test files.
|
|
||||||
//
|
|
||||||
// This is a great place to put global configuration and
|
|
||||||
// behavior that modifies Cypress.
|
|
||||||
//
|
|
||||||
// You can change the location of this file or turn off
|
|
||||||
// automatically serving support files with the
|
|
||||||
// 'supportFile' configuration option.
|
|
||||||
//
|
|
||||||
// You can read more here:
|
|
||||||
// https://on.cypress.io/configuration
|
|
||||||
// ***********************************************************
|
|
||||||
|
|
||||||
// Import commands.js using ES2015 syntax:
|
// Import commands.js using ES2015 syntax:
|
||||||
import "./commands";
|
import "./commands";
|
||||||
|
|
||||||
// Alternatively you can use CommonJS syntax:
|
|
||||||
// require('./commands')
|
|
||||||
|
|
||||||
//unique test run ID for all tests
|
//unique test run ID for all tests
|
||||||
Cypress.config("cyid", `cy${new Date().getTime()}`);
|
Cypress.config("cyid", `cy${new Date().getTime()}`);
|
||||||
|
|
||||||
|
// Global guard: halt all tests if abort flag exists
|
||||||
|
beforeEach(function () {
|
||||||
|
cy.task("checkAbortFlag").then(shouldAbort => {
|
||||||
|
if (shouldAbort) {
|
||||||
|
Cypress.runner.stop();
|
||||||
|
this.skip();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// Basic smoke test, visit every form to ensure they load
|
// Basic smoke test, visit every form to ensure they load
|
||||||
|
|
||||||
describe("SMOKE SETUP", () => {
|
describe("SMOKE SETUP", () => {
|
||||||
it("Generates test data without issue", () => {
|
before(() => {
|
||||||
cy.request({
|
cy.request({
|
||||||
url: `${Cypress.env("apiBaseUrl")}auth`,
|
url: `${Cypress.env("apiBaseUrl")}auth`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -12,24 +11,77 @@ describe("SMOKE SETUP", () => {
|
|||||||
})
|
})
|
||||||
.its("body")
|
.its("body")
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
cy.request({
|
||||||
|
method: "GET",
|
||||||
|
url: `${Cypress.env("apiBaseUrl")}server-info`,
|
||||||
|
auth: { bearer: res.data.token }
|
||||||
|
}).then((resp) => {
|
||||||
|
const raw = resp.body.data.serverVersion
|
||||||
|
const match = raw.match(/(\d+\.\d+\.\d+)/)
|
||||||
|
|
||||||
|
if (!match) {
|
||||||
|
cy.task('setAbortFlag').then(() => {
|
||||||
|
throw new Error(`Could not parse version from: "${raw}"`)
|
||||||
|
})
|
||||||
|
return // prevent further execution
|
||||||
|
}
|
||||||
|
|
||||||
|
const version = match[1]
|
||||||
|
const expected = Cypress.env("expectedServerVersion")
|
||||||
|
|
||||||
|
if (version !== expected) {
|
||||||
|
cy.task('setAbortFlag').then(() => {
|
||||||
|
throw new Error(`❌ Version mismatch: server is ${version}, expected ${expected}. ABORTING ALL TESTS.`)
|
||||||
|
})
|
||||||
|
return // prevent further execution
|
||||||
|
}
|
||||||
|
|
||||||
|
cy.log(`✓ Server version confirmed: ${version}`)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
it("Generates test data without issue", () => {
|
||||||
|
cy.request({
|
||||||
|
url: `${Cypress.env("apiBaseUrl")}auth`,
|
||||||
|
method: "POST",
|
||||||
|
body: {
|
||||||
|
login: Cypress.env("admin").login,
|
||||||
|
password: Cypress.env("admin").password
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.its("body")
|
||||||
|
.then(res => {
|
||||||
cy.request({
|
cy.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: `${Cypress.env("apiBaseUrl")}trial/seed`,
|
url: `${Cypress.env("apiBaseUrl")}license/permanently-erase-all-data`,
|
||||||
auth: {
|
auth: {
|
||||||
bearer: res.data.token
|
bearer: res.data.token
|
||||||
}, ///small/-7/true
|
},
|
||||||
body: {
|
headers: {
|
||||||
seedLevel: "small",
|
"Content-Type": "application/json"
|
||||||
timeZoneOffset: -7,
|
},
|
||||||
e2e: true
|
body: JSON.stringify("I understand")
|
||||||
}
|
}).then(() => {
|
||||||
})
|
cy.request({
|
||||||
.its("body")
|
method: "POST",
|
||||||
.then((resjob) => {
|
url: `${Cypress.env("apiBaseUrl")}trial/seed`,
|
||||||
cy.log(`resjob is: ${JSON.stringify(resjob)}`);
|
auth: {
|
||||||
// expect(resjob.body).to.have.property('jobId');
|
bearer: res.data.token
|
||||||
confirmJobDone(resjob.jobId, res.data.token);
|
}, ///small/-7/true
|
||||||
});
|
body: {
|
||||||
|
seedLevel: "small",
|
||||||
|
timeZoneOffset: -7,
|
||||||
|
e2e: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.its("body")
|
||||||
|
.then(resjob => {
|
||||||
|
cy.log(`resjob is: ${JSON.stringify(resjob)}`);
|
||||||
|
// expect(resjob.body).to.have.property('jobId');
|
||||||
|
confirmJobDone(resjob.jobId, res.data.token);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
});
|
});
|
||||||
@@ -41,7 +93,7 @@ function confirmJobDone(jobId, authToken) {
|
|||||||
auth: {
|
auth: {
|
||||||
bearer: authToken
|
bearer: authToken
|
||||||
}
|
}
|
||||||
}).then((resp) => {
|
}).then(resp => {
|
||||||
//3 means job done
|
//3 means job done
|
||||||
if (resp.body.data == 3) return;
|
if (resp.body.data == 3) return;
|
||||||
// else recurse
|
// else recurse
|
||||||
@@ -49,3 +101,54 @@ function confirmJobDone(jobId, authToken) {
|
|||||||
confirmJobDone(jobId, authToken);
|
confirmJobDone(jobId, authToken);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===============================================
|
||||||
|
// describe("SMOKE SETUP", () => {
|
||||||
|
// it("Generates test data without issue", () => {
|
||||||
|
// cy.request({
|
||||||
|
// url: `${Cypress.env("apiBaseUrl")}auth`,
|
||||||
|
// method: "POST",
|
||||||
|
// body: {
|
||||||
|
// login: Cypress.env("admin").login,
|
||||||
|
// password: Cypress.env("admin").password
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// .its("body")
|
||||||
|
// .then((res) => {
|
||||||
|
// cy.request({
|
||||||
|
// method: "POST",
|
||||||
|
// url: `${Cypress.env("apiBaseUrl")}trial/seed`,
|
||||||
|
// auth: {
|
||||||
|
// bearer: res.data.token
|
||||||
|
// }, ///small/-7/true
|
||||||
|
// body: {
|
||||||
|
// seedLevel: "small",
|
||||||
|
// timeZoneOffset: -7,
|
||||||
|
// e2e: true
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// .its("body")
|
||||||
|
// .then((resjob) => {
|
||||||
|
// cy.log(`resjob is: ${JSON.stringify(resjob)}`);
|
||||||
|
// // expect(resjob.body).to.have.property('jobId');
|
||||||
|
// confirmJobDone(resjob.jobId, res.data.token);
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// //-----------------------------------------------------
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// function confirmJobDone(jobId, authToken) {
|
||||||
|
// cy.request({
|
||||||
|
// method: "GET",
|
||||||
|
// url: `${Cypress.env("apiBaseUrl")}job-operations/status/${jobId}`,
|
||||||
|
// auth: {
|
||||||
|
// bearer: authToken
|
||||||
|
// }
|
||||||
|
// }).then((resp) => {
|
||||||
|
// //3 means job done
|
||||||
|
// if (resp.body.data == 3) return;
|
||||||
|
// // else recurse
|
||||||
|
// cy.wait(1000);
|
||||||
|
// confirmJobDone(jobId, authToken);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Basic nav and menu test just to confirm each section menu works
|
// Basic nav and menu test just to confirm each section menu works
|
||||||
describe("SMOKE NAV", () => {
|
describe("SMOKE NAV", () => {
|
||||||
it("Nav and menu functions correctly", () => {
|
it("Nav and menu functions correctly", () => {
|
||||||
cy.ayLogin("admin");
|
cy.ayLogin("bizadmin");
|
||||||
|
|
||||||
cy.get("[data-cy=navicon]").click();
|
cy.get("[data-cy=navicon]").click();
|
||||||
cy.get("[data-cy=home]").click();
|
cy.get("[data-cy=home]").click();
|
||||||
|
|||||||
29
e2e/tests/regression/2-report/001-run-report.cy.js
Normal file
29
e2e/tests/regression/2-report/001-run-report.cy.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
describe("Report generation", () => {
|
||||||
|
it("Customer report opens without error", () => {
|
||||||
|
cy.ayLogin("bizadmin");
|
||||||
|
|
||||||
|
cy.visit("/cust-customers/1");
|
||||||
|
cy.url().should("include", "/cust-customers/1");
|
||||||
|
cy.get("[data-cy=generalerror]").should("not.exist");
|
||||||
|
cy.get("[data-cy=name]");
|
||||||
|
|
||||||
|
// Stub window.open AFTER the page has loaded
|
||||||
|
cy.window().then(win => {
|
||||||
|
cy.stub(win, "open").as("windowOpen");
|
||||||
|
});
|
||||||
|
|
||||||
|
cy.get("[data-cy=contextmenu]").click();
|
||||||
|
cy.get("[data-cy='customer-edit:report']").click();
|
||||||
|
cy.get(".v-list > :nth-child(1) > .v-list-item__title").click();
|
||||||
|
|
||||||
|
// The render job is async — give it time to complete and call window.open
|
||||||
|
// Adjust timeout if your reports take longer to render
|
||||||
|
cy.get("@windowOpen", { timeout: 30000 }).should("have.been.calledOnce");
|
||||||
|
|
||||||
|
// Verify the URL passed to window.open looks like a PDF download
|
||||||
|
cy.get("@windowOpen").should(
|
||||||
|
"have.been.calledWithMatch",
|
||||||
|
/\/api\/v8\.0\/report\/download\/.+\.pdf/
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -62,7 +62,13 @@ describe("Workorder creation", () => {
|
|||||||
cy.ayChooseGZPickList("projectId", "e2e");
|
cy.ayChooseGZPickList("projectId", "e2e");
|
||||||
cy.get("[data-cy='serviceDate:date']").type(dayjs().format("YYYY-MM-DD"));
|
cy.get("[data-cy='serviceDate:date']").type(dayjs().format("YYYY-MM-DD"));
|
||||||
cy.get("[data-cy='serviceDate:time']").type(dayjs().format("HH:mm"));
|
cy.get("[data-cy='serviceDate:time']").type(dayjs().format("HH:mm"));
|
||||||
cy.get("[data-cy=customerContactName]").type(`Jayne Smith`);
|
//This is a dialog component and no matter what I do I can't get any data-cy tag to be exposed in the actual tested UI
|
||||||
|
//even though every bit of it has a data-cy tag at every level in the source code. It doesn't seem to exist as it's coded
|
||||||
|
//clicking on it didn't help. It used to be a simple text input but now it's broken and I have no idea how to test it
|
||||||
|
//but it's not critical so bypassing it for now. First was teh simple type then tried the click and type, neither works
|
||||||
|
//inspecting it shows no data-cy tags anywhere despite them being coded
|
||||||
|
//cy.get("[data-cy=customerContactName]").click().type(`Jayne Smith`);
|
||||||
|
//cy.get("[data-cy=customerContactName]").type(`Jayne Smith`);//26fail Timed out retrying after 5000ms: Expected to find element: [data-cy=customerContactName], but never found it.
|
||||||
cy.get("[data-cy=customerReferenceNumber]").type(
|
cy.get("[data-cy=customerReferenceNumber]").type(
|
||||||
`cref-${Cypress.config("cyid")}`
|
`cref-${Cypress.config("cyid")}`
|
||||||
);
|
);
|
||||||
@@ -9,28 +9,58 @@ MEM avg representative during actual test phase
|
|||||||
LOAD avg representative 5 minute load value during test (not super relevant but maybe in conjunction with other values a good representative)
|
LOAD avg representative 5 minute load value during test (not super relevant but maybe in conjunction with other values a good representative)
|
||||||
RESTARTS number of times ayanova was restarted due to dotnet exit w error
|
RESTARTS number of times ayanova was restarted due to dotnet exit w error
|
||||||
|
|
||||||
2022-09-14 $6 droplet tests 3312.onayanova.com in GZTechWorksInc / 1 GB Memory / 25 GB Disk / NYC1 - Ubuntu 22.04 x64
|
|
||||||
|
|
||||||
Basic
|
Test parameters, user count only change between runs, 20 minutes each run. 5 minutes "soak" time between data generation and start of test run
|
||||||
Shared CPU
|
|
||||||
1 vCPU
|
|
||||||
1 GB
|
|
||||||
25 GB
|
|
||||||
1 TB
|
|
||||||
$6/mo
|
|
||||||
Test parameters, user count only change between runs, 20 minutes each run
|
|
||||||
./jmeter/bin/jmeter.bat -f -n -t stressdevops.jmx -l ./results/results.jtl -e -o ./results -JayServer=3312.onayanova.com -JaySeedLevel=large -JayUserCount=20 -JayDuration=1200 -JayProtocol=https
|
./jmeter/bin/jmeter.bat -f -n -t stressdevops.jmx -l ./results/results.jtl -e -o ./results -JayServer=3312.onayanova.com -JaySeedLevel=large -JayUserCount=20 -JayDuration=1200 -JayProtocol=https
|
||||||
|
|
||||||
Note: large seedlevel took 11 minutes to generate so data was gathered after that point
|
|
||||||
|
GOALS
|
||||||
|
Don't crash the server (no restarts of AyaNova)
|
||||||
|
Don't run out of memory
|
||||||
|
Average appdex of .85 or better
|
||||||
|
REasonable cpu overhead (which corelates to desired appdex around max )
|
||||||
|
True (test not seeding) pass rate of 98% or higher
|
||||||
|
|
||||||
|
|
||||||
|
All tests were on same droplet: 3312.onayanova.com in NYC1 data center - Ubuntu 22.04 x64
|
||||||
|
Sized it up and ran through each level of testing
|
||||||
|
Tests are a what I hope is a fairly representative simulation of users hitting it pretty hard in a real world manner (e.g. random brief pauses between page loads, not just serially hammering it in a machine like manner).
|
||||||
|
|
||||||
|
TYPE CPU TYPE VCPUS MEMORY SSD TRANSFER PRICE
|
||||||
|
=============================================
|
||||||
|
|
||||||
|
BASIC SHARED CPU 1 VCPU 1 GB 25 GB 1 TB $6/MO
|
||||||
2022-09-14 17:55:22 30 users cpu 47%, mem 83%, load 1.15, apdex avg .920, appdex worst quote .556, pass 98.98%, restarts 0
|
2022-09-14 17:55:22 30 users cpu 47%, mem 83%, load 1.15, apdex avg .920, appdex worst quote .556, pass 98.98%, restarts 0
|
||||||
2022-09-14 18:53:24 50 users cpu 73%, mem 86%, load 2.3, apdex avg .872 worst quote .400, pass 99.95%, restarts 0. theoretically within bounds here
|
2022-09-14 18:53:24 50 users cpu 73%, mem 86%, load 2.3, apdex avg .872 worst quote .400, pass 99.95%, restarts 0
|
||||||
2022-09-14 19:56:51 75 users cpu 98%, mem 94%, load 12, apdex avg .577 worst quote .023, pass 86%, restarts 2 surprisingly usable in a pinch but not realistic
|
2022-09-14 19:56:51 75 users cpu 98%, mem 94%, load 12, apdex avg .577 worst quote .023, pass 86%, restarts 2
|
||||||
|
|
||||||
2022-09-14 20:58:35 SUPERLOAD huge data, 8 hours run time 20 users cpu 42%, mem 82%, load 1.2, apdex avg .917 worst .489 (makes sense lots of records, quote was .712), pass 99.86%, restarts 0
|
2022-09-14 20:58:35 SUPERLOAD huge data, 8 hours run time 20 users cpu 42%, mem 82%, load 1.2, apdex avg .917 worst .489 (makes sense lots of records, quote was .712), pass 99.86%, restarts 0
|
||||||
|
|
||||||
|
BASIC - PREMIUM AMD SHARED CPU 1 VCPU 1 GB 25 GB 1 TB $7/MO
|
||||||
2022-09-15 07:32:50 resize droplet to basic premium AMD only change then rerun
|
2022-09-15 07:32:50 resize droplet to basic premium AMD only change then rerun
|
||||||
2022-09-15 09:23:31 30 users cpu 35%, mem 85%, load 1.0, appdex avg .955 worst quote .821, pass 100%, restarts 0
|
2022-09-15 09:23:31 30 users cpu 35%, mem 85%, load 1.0, appdex avg .955 worst quote .821, pass 100%, restarts 0
|
||||||
2022-09-15 10:02:08 50 users
|
2022-09-15 10:47:17 50 users cpu 60%, mem 89%, load 2.0, appdex avg .925 worst pm .587, pass 99.98%, restarts 0
|
||||||
|
2022-09-15 12:50:43 75 users cpu 87%, mem 95%, load 6.0, appdex avg .775 worst qutoe .237, pass 94.08%, restarts 1
|
||||||
|
|
||||||
|
BASIC PREMIUM AMD SHARED CPU 1 VCPU 2 GB 25 GB 2 TB (2gb ram is only relevant change from previous)
|
||||||
|
2022-09-15 15:38:59 30 users cpu 43%, mem 48%, load .97, appdex avg .949 worst quote .772, pass 99.99%, restarts 0
|
||||||
|
2022-09-15 16:16:16 50 users cpu 69%, mem 57%, load 2.3, appdex avg .913 worst quote .594, pass 99.97%, restarts 0
|
||||||
|
2022-09-15 16:52:42 75 users cpu 87%, mem 67%, load 6.0, appdex avg .813 worst quote .241, pass 99.2%, restarts 1
|
||||||
|
|
||||||
|
BASIC SHARED CPU 2 VCPUS 2 GB 25 GB 3 TB $18/MO
|
||||||
|
2022-09-15 17:33:06 30 users cpu 38%, mem 44%, load 1.47, appdex avg .941 worst quote .623, pass 99.99%, restarts 0
|
||||||
|
2022-09-15 18:11:14 50 users cpu 46%, mem 51%, load 1.5, appdex avg .956 worst pm .765, pass 99.99%, restarts 0
|
||||||
|
2022-09-15 18:53:46 75 users cpu 74%, mem 65%, load 4.4, appdex avg .913 worst quote .439, pass 99.93%, restarts 0
|
||||||
|
|
||||||
|
|
||||||
|
BASIC - PREMIUM AMD SHARED CPU 2 VCPUS 2 GB 25 GB 3 TB $21/MO
|
||||||
|
30 users cpu 20%, mem 65%, load .45, appdex avg .986 worst data-list/CustomerDataList .943, pass 100%
|
||||||
|
50 users cpu 32%, mem 67%, load 1.0, appdex avg .983 worst data-list/CustomerDataList .917, pass 99.99%
|
||||||
|
75 users cpu 43%, mem 73%, load 1.5, appdex avg .981 worst custdatalist .917 , pass 99.99% , restarts 0
|
||||||
|
100 users cpu 57%, mem 77%, load 2.3, appdex avg .959 worst quote .815 , pass 99.97 , restarts 0
|
||||||
|
|
||||||
|
|
||||||
|
CPU-OPTIMIZED *DEDICATED* CPU 2 VCPUS 4 GB 25 GB 4 TB $42/MO
|
||||||
|
30 users cpu 10%, mem 26%, load .35 , appdex avg .969 worst customerdatalist .858 , pass 99.98% , restarts 0
|
||||||
|
50 users cpu 15%, mem 29%, load .48, appdex avg .969 worst customerdatalist .868 , pass 99.98 , restarts 0
|
||||||
|
75 users cpu 21%, mem 35%, load .78, appdex avg .970 worst customerdatalist .843 , pass 100% , restarts 0
|
||||||
|
100 users cpu 30%, mem 46%, load 1.2, appdex avg .967 worst customerdatalist .854 , pass 99.98% , restarts 0
|
||||||
|
|||||||
@@ -1 +1,4 @@
|
|||||||
./jmeter/bin/jmeter.bat -f -n -t stressdevops.jmx -l ./results/results.jtl -e -o ./results -JayServer=3312.onayanova.com -JaySeedLevel=large -JayUserCount=50 -JayDuration=1200 -JayProtocol=https
|
rem ./jmeter/bin/jmeter.bat -f -n -t stressdevops.jmx -l ./results/results.jtl -e -o ./results -JayServer=3312.onayanova.com -JaySeedLevel=large -JayUserCount=30 -JayDuration=1200 -JayProtocol=https
|
||||||
|
rem ./jmeter/bin/jmeter.bat -f -n -t stressdevops.jmx -l ./results/results.jtl -e -o ./results -JayServer=3312.onayanova.com -JaySeedLevel=large -JayUserCount=50 -JayDuration=1200 -JayProtocol=https
|
||||||
|
rem ./jmeter/bin/jmeter.bat -f -n -t stressdevops.jmx -l ./results/results.jtl -e -o ./results -JayServer=3312.onayanova.com -JaySeedLevel=large -JayUserCount=75 -JayDuration=1200 -JayProtocol=https
|
||||||
|
./jmeter/bin/jmeter.bat -f -n -t stressdevops.jmx -l ./results/results.jtl -e -o ./results -JayServer=3312.onayanova.com -JaySeedLevel=large -JayUserCount=100 -JayDuration=1200 -JayProtocol=https
|
||||||
|
|||||||
Reference in New Issue
Block a user