[bitnami/wordpress] Improve Wordpress VIB test coverage (#8841)

* Adding more tests to Wordpress. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Adding more tests to Wordpress. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Removed spaces. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Changed runtime parameters, changed username and password. Added Jmeter action to verify pipeline. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Changed runtime parameters, changed username and password. Added Jmeter action to verify pipeline. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Fixed the pipeline path. Triggered pipeline execution. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Fixed the pipeline path. Triggered pipeline execution. Removed the README.md. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Fixed the resources path for Jmeter. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Test plan path fix for Jmeter. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Removed package-lock.json. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Removed Jmeter action completely. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Removed Jmeter action completely. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Changed the logout test. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Added back the Jmeter tests. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Added back the Jmeter tests. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

* Added the Cypress command comment. Signed-off-by: Aleksandra Lukic <alukic@vmware.com>

Signed-off-by: Aleksandra Lukic <alukic@vmware.com>
This commit is contained in:
superaleks
2022-02-02 13:41:47 +01:00
committed by GitHub
parent e774de12ec
commit fb77de6236
16 changed files with 364 additions and 4255 deletions
+2 -3
View File
@@ -21,7 +21,7 @@
},
"verify": {
"context": {
"runtime_parameters": "d29yZHByZXNzUGFzc3dvcmQ6IFMzOUJLV2pTa2gKbWFyaWFkYjoKICBhdXRoOgogICAgcGFzc3dvcmQ6IFZxbDVSR2RjbzQKICAgIHJvb3RQYXNzd29yZDogVUM1eVUwWUE2Sgo="
"runtime_parameters": "d29yZHByZXNzVXNlcm5hbWU6IHRlc3RfdXNlcgp3b3JkcHJlc3NQYXNzd29yZDogQ29tcGxpY2F0ZWRQYXNzd29yZDEyMyE0CndvcmRwcmVzc0VtYWlsOiB0ZXN0X3VzZXJfZW1haWxAZW1haWwuY29tCndvcmRwcmVzc0ZpcnN0TmFtZTogVGVzdE5hbWUKd29yZHByZXNzTGFzdE5hbWU6IFRlc3RMYXN0TmFtZQp3b3JkcHJlc3NCbG9nTmFtZTogVGVzdF9Vc2VycydzIEJsb2chCnNtdHBIb3N0OiBtYWlsLnNlcnZlci5jb20Kc210cFBvcnQ6IDEyMApzbXRwVXNlcjogdGVzdF9tYWlsX3VzZXIKc210cFBhc3N3b3JkOiB0ZXN0X21haWxfcGFzc3dvcmQKbWFyaWFkYjoKICBhdXRoOgogICAgZGF0YWJhc2U6IHRlc3Rfd29yZHByZXNzX2RhdGFiYXNlCiAgICB1c2VybmFtZTogdGVzdF93b3JkcHJlc3NfdXNlcm5hbWUKICAgIHBhc3N3b3JkOiB0ZXN0X3dvcmRwcmVzc19wYXNzd29yZAp3b3JkcHJlc3NQbHVnaW5zOiBhbGwKY29udGFpbmVyU2VjdXJpdHlDb250ZXh0OgogIGVuYWJsZWQ6IHRydWUKICBydW5Bc1VzZXI6IDEwMDIKICBydW5Bc05vblJvb3Q6IHRydWUKd29yZHByZXNzVGFibGVQcmVmaXg6IHdvcmRwcmVzc18Kd29yZHByZXNzQXV0b1VwZGF0ZUxldmVsOiBtaW5vcg=="
},
"actions": [
{
@@ -36,5 +36,4 @@
]
}
}
}
}
+20 -3
View File
@@ -19,7 +19,7 @@
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/wordpress"
},
"runtime_parameters": "d29yZHByZXNzUGFzc3dvcmQ6IFMzOUJLV2pTa2gKbWFyaWFkYjoKICBhdXRoOgogICAgcGFzc3dvcmQ6IFZxbDVSR2RjbzQKICAgIHJvb3RQYXNzd29yZDogVUM1eVUwWUE2Sgo=",
"runtime_parameters": "d29yZHByZXNzVXNlcm5hbWU6IHRlc3RfdXNlcgp3b3JkcHJlc3NQYXNzd29yZDogQ29tcGxpY2F0ZWRQYXNzd29yZDEyMyE0CndvcmRwcmVzc0VtYWlsOiB0ZXN0X3VzZXJfZW1haWxAZW1haWwuY29tCndvcmRwcmVzc0ZpcnN0TmFtZTogVGVzdE5hbWUKd29yZHByZXNzTGFzdE5hbWU6IFRlc3RMYXN0TmFtZQp3b3JkcHJlc3NCbG9nTmFtZTogVGVzdF9Vc2VycydzIEJsb2chCnNtdHBIb3N0OiBtYWlsLnNlcnZlci5jb20Kc210cFBvcnQ6IDEyMApzbXRwVXNlcjogdGVzdF9tYWlsX3VzZXIKc210cFBhc3N3b3JkOiB0ZXN0X21haWxfcGFzc3dvcmQKbWFyaWFkYjoKICBhdXRoOgogICAgZGF0YWJhc2U6IHRlc3Rfd29yZHByZXNzX2RhdGFiYXNlCiAgICB1c2VybmFtZTogdGVzdF93b3JkcHJlc3NfdXNlcm5hbWUKICAgIHBhc3N3b3JkOiB0ZXN0X3dvcmRwcmVzc19wYXNzd29yZAp3b3JkcHJlc3NQbHVnaW5zOiBhbGwKY29udGFpbmVyU2VjdXJpdHlDb250ZXh0OgogIGVuYWJsZWQ6IHRydWUKICBydW5Bc1VzZXI6IDEwMDIKICBydW5Bc05vblJvb3Q6IHRydWUKd29yZHByZXNzVGFibGVQcmVmaXg6IHdvcmRwcmVzc18Kd29yZHByZXNzQXV0b1VwZGF0ZUxldmVsOiBtaW5vcg==",
"target_platform": {
"target_platform_id": "{TARGET_PLATFORM}",
"size": {
@@ -61,8 +61,25 @@
"endpoint": "lb-wordpress-https",
"app_protocol": "HTTPS",
"env": {
"username": "user",
"password": "S39BKWjSkh"
"username": "test_user",
"password": "ComplicatedPassword123!4"
}
}
}
},
{
"action_id": "jmeter",
"params": {
"resources": {
"path": "/.vib/wordpress/jmeter"
},
"config": {
"test_plan_file": "wordpress.jmx",
"endpoint": "lb-wordpress-https",
"app_protocol": "HTTPS",
"env": {
"wordpress.username": "test_user",
"wordpress.password": "ComplicatedPassword123!4"
}
}
}
+10 -3
View File
@@ -1,7 +1,14 @@
{
"baseUrl": "http://192.168.64.101",
"baseUrl": "http://192.168.64.101/",
"env": {
"username": "user",
"password": "mytestpassword"
"username": "test_user",
"password": "ComplicatedPassword123!4",
"wordpressBlogname": "Test_Users's Blog!",
"wordpressEmail": "test_user_email@email.com",
"smtpMailServer": "mail.server.com",
"smtpPort": "120",
"smtpUser": "test_mail_user",
"wordpressFirstName": "TestName",
"wordpressLastName":"TestLastName"
}
}
@@ -1,5 +1,5 @@
{
"username": "randomuser",
"password": "randompassword",
"email": "randomuser@foo.bar"
"username": "randomuser",
"password": "randompassword",
"email": "randomuser@foo.bar"
}
@@ -0,0 +1,17 @@
/// <reference types="cypress" />
describe('Admin page', () => {
beforeEach(() => {
cy.login();
cy.visit('wp-admin/options-general.php')
})
it('checks the blog name', () => {
cy.get('#blogname').should('have.value', Cypress.env('wordpressBlogname'));
})
it('checks the user email', () => {
cy.get('#new_admin_email').should('have.value', Cypress.env('wordpressEmail'));
})
})
@@ -1,12 +1,8 @@
/// <reference types="cypress" />
describe('Admin page', () => {
describe('Edit page ', () => {
beforeEach(() => {
cy.visit('/wp-login.php')
cy.wait(500)
cy.get('#user_login').type(Cypress.env('username')).should('have.value', Cypress.env('username'));
cy.get('#user_pass').type(Cypress.env('password')).should('have.value', Cypress.env('password'));
cy.get('#wp-submit').click();
cy.login();
cy.visit('/wp-admin/index.php')
})
@@ -1,16 +1,13 @@
/// <reference types="cypress" />
describe('Login page', () => {
describe('Login-logout test', () => {
beforeEach(() => {
cy.clearCookies();
cy.visit('/wp-login.php')
cy.wait(500)
})
it('allows login to a valid user.', () => {
cy.get('#user_login').type(Cypress.env('username')).should('have.value', Cypress.env('username'));
cy.get('#user_pass').type(Cypress.env('password')).should('have.value', Cypress.env('password'));
cy.get('#wp-submit').click();
cy.login();
cy.get('#login_error').should('not.exist')
})
@@ -31,6 +28,13 @@ describe('Login page', () => {
cy.get('#user_pass').type(user.password).should('have.value', user.password);
})
cy.get('#wp-submit').click();
cy.get('#login_error').should('contain.text', 'Error: The password you entered for the username user is incorrect. Lost your password?');
cy.get('#login_error').should('be.visible');
})
it('allows to log out.', () => {
cy.login();
cy.get("#wp-admin-bar-logout .ab-item").click({ force: true });
cy.get('.message').contains('logged out');
})
})
@@ -1,6 +1,6 @@
/// <reference types="cypress" />
describe('Hello World post', () => {
beforeEach(() => {
cy.visit('/')
})
@@ -30,6 +30,7 @@ describe('Hello World post', () => {
cy.fixture('helloworld').then((hw) => {
cy.get('#comment').type(hw.comment).should('have.value', hw.comment);
})
cy.fixture('user').then((user) => {
cy.get('#author').type(user.username).should('have.value', user.username);
cy.get('#email').type(user.email).should('have.value', user.email);
@@ -0,0 +1,34 @@
/// <reference types="cypress" />
describe('SMTP config test', () => {
beforeEach(() => {
cy.login();
cy.visit('wp-admin/admin.php?page=wp-mail-smtp');
})
it('checks for presence of WP Mail SMTP', () => {
cy.get('div').contains('WP Mail SMTP').should('be.visible');
})
it('checks for configuration of WP Mail test', () => {
cy.visit('wp-admin/admin.php?page=wp-mail-smtp-tools&tab=test');
cy.get('#wp-mail-smtp-setting-test_email').should('have.value', Cypress.env('wordpressEmail'))
})
it('checks for configuration of mail server', () => {
cy.get('#wp-mail-smtp-setting-smtp-host').should('have.value', Cypress.env('smtpMailServer'));
})
it('checks for configuration of SMTP port', () => {
cy.get('#wp-mail-smtp-setting-smtp-port').should('have.value', Cypress.env('smtpPort'))
})
it('checks for configuration of SMTP username', () => {
cy.get('#wp-mail-smtp-setting-smtp-user').should('have.value', Cypress.env('smtpUser'))
})
it('checks for configuration of the names emails are sent from', () => {
cy.get('#wp-mail-smtp-setting-from_name').should('have.value', `${Cypress.env('wordpressFirstName')} ${Cypress.env('wordpressLastName')}`);
})
})
@@ -0,0 +1,12 @@
/// <reference types="cypress" />
describe('Automatic update configuration test', () => {
beforeEach(() => {
cy.login();
})
it('checks the value of auto update status', () => {
cy.visit("wp-admin/update-core.php");
cy.get('.auto-update-status').should('contain.text', 'This site is automatically kept up to date with maintenance and security releases of WordPress only.');
})
})
@@ -1,25 +1,26 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
// Added to slow down Cypress test execution without using hardcoded waits. If removed, there will be false positives.
const COMMAND_DELAY = 200;
for (const command of ['click']) {
Cypress.Commands.overwrite(command, (originalFn, ...args) => {
const origVal = originalFn(...args);
return new Promise((resolve) => {
setTimeout(() => {
resolve(origVal);
}, COMMAND_DELAY);
});
});
}
Cypress.Commands.add("login", (
username = Cypress.env("username"),
password = Cypress.env("password")
) => {
cy.clearCookies();
cy.visit('/wp-login.php')
cy.get('#user_login').type(username);
cy.get('#user_pass').type(password);
cy.get('#wp-submit').click();
});
File diff suppressed because it is too large Load Diff
-14
View File
@@ -1,14 +0,0 @@
{
"name": "wordpress-cypress-tests",
"version": "0.1.0",
"description": "E2E testing for Wordpress 5.7.1 in Cypress",
"author": "",
"license": "ISC",
"scripts": {
"cy:run": "cypress run -C cypress.json",
"cy:open": "cypress open -C cypress.json"
},
"devDependencies": {
"cypress": "^7.3.0"
}
}
+39
View File
@@ -28,6 +28,45 @@ command:
- "/WP-CLI global config:\\s*\\/opt\\/bitnami\\/wp-cli\\/conf\\/wp-cli.yml/"
stderr: []
timeout: 20000
wp-db-create-user:
exec: wp user create test test@example.com --role=author
exit-status: 0
stdout:
- "Success: Created user"
stderr: []
timeout: 20000
wp-post-exists:
exec: wp post list
exit-status: 0
stdout:
- "Hello world!"
stderr: [ ]
timeout: 20000
wp-config-list:
exec: wp config list
exit-status: 0
stdout:
- "test_wordpress_database"
- "test_wordpress_username"
- "test_wordpress_password"
- "wordpress_"
stderr: [ ]
timeout: 20000
wordpress-user-id:
exec: id -u
exit-status: 0
stdout:
- '1002'
stderr: [ ]
timeout: 20000
wordpress-plugin-list:
exec: wp plugin list
exit-status: 0
stdout:
- "advanced-cache.php"
- "google-analytics-for-wordpress"
stderr: [ ]
timeout: 20000
addr:
tcp://wordpress-mariadb:3306:
reachable: true
+185 -84
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.1">
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Wordpress Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
@@ -24,12 +24,12 @@
</elementProp>
<elementProp name="wordpress.username" elementType="Argument">
<stringProp name="Argument.name">wordpress.username</stringProp>
<stringProp name="Argument.value">${__P(wordpress.username,user)}</stringProp>
<stringProp name="Argument.value">${__P(wordpress.username,test_user)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="wordpress.password" elementType="Argument">
<stringProp name="Argument.name">wordpress.password</stringProp>
<stringProp name="Argument.value">${__P(wordpress.password,pass)}</stringProp>
<stringProp name="Argument.value">${__P(wordpress.password,ComplicatedPassword123!4)}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
@@ -37,21 +37,110 @@
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Get pages" enabled="true">
<stringProp name="TestPlan.comments">Virtual users getting pages</stringProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">15</stringProp>
<stringProp name="ThreadGroup.ramp_time">20</stringProp>
<boolProp name="ThreadGroup.scheduler">true</boolProp>
<stringProp name="ThreadGroup.duration">60</stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">false</boolProp>
<boolProp name="ThreadGroup.delayedStart">true</boolProp>
</ThreadGroup>
<hashTree>
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${url.host}</stringProp>
<stringProp name="HTTPSampler.port">${url.port}</stringProp>
<stringProp name="HTTPSampler.protocol">${url.schema}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path"></stringProp>
<stringProp name="TestPlan.comments">Notice Timeouts: Read to 30s, Connect to 5s</stringProp>
<stringProp name="HTTPSampler.concurrentPool">4</stringProp>
<stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
<stringProp name="HTTPSampler.response_timeout">30000</stringProp>
</ConfigTestElement>
<hashTree/>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value"> Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:48.0) Gecko/20100101 Firefox/48.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value"> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value"> fr,en-US;q=0.7,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value"> gzip, deflate</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get pages" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Variables pré-définies" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">${url.host}</stringProp>
<stringProp name="HTTPSampler.port">${url.port}</stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/wp-json/wp/v2/pages</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree/>
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="ThinkTime1s" enabled="true">
<intProp name="ActionProcessor.action">1</intProp>
<intProp name="ActionProcessor.target">0</intProp>
<stringProp name="ActionProcessor.duration">100</stringProp>
</TestAction>
<hashTree>
<UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="URT" enabled="true">
<stringProp name="ConstantTimer.delay">10000</stringProp>
<stringProp name="RandomTimer.range">100.0</stringProp>
</UniformRandomTimer>
<hashTree/>
</hashTree>
<DurationAssertion guiclass="DurationAssertionGui" testclass="DurationAssertion" testname="Duration Assertion" enabled="true">
<stringProp name="DurationAssertion.duration">500</stringProp>
</DurationAssertion>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Create post scenario" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<intProp name="LoopController.loops">-1</intProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">10</stringProp>
<stringProp name="ThreadGroup.ramp_time">5</stringProp>
<stringProp name="ThreadGroup.num_threads">5</stringProp>
<stringProp name="ThreadGroup.ramp_time">10</stringProp>
<longProp name="ThreadGroup.start_time">1373789594000</longProp>
<longProp name="ThreadGroup.end_time">1373789594000</longProp>
<boolProp name="ThreadGroup.scheduler">true</boolProp>
<stringProp name="ThreadGroup.duration">60</stringProp>
<stringProp name="ThreadGroup.delay">5</stringProp>
<stringProp name="TestPlan.comments">Virtual Users creating posts.</stringProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="TestPlan.comments">Virtual Users creating posts</stringProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">false</boolProp>
<boolProp name="ThreadGroup.delayedStart">true</boolProp>
</ThreadGroup>
<hashTree>
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
@@ -94,49 +183,11 @@
</collectionProp>
</HeaderManager>
<hashTree/>
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true">
<collectionProp name="CookieManager.cookies"/>
<boolProp name="CookieManager.clearEachIteration">true</boolProp>
<boolProp name="CookieManager.controlledByThreadGroup">true</boolProp>
</CookieManager>
<hashTree/>
<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Create post controller" enabled="true">
<boolProp name="TransactionController.includeTimers">false</boolProp>
<boolProp name="TransactionController.parent">false</boolProp>
</TransactionController>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Login set headers" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Variables pré-définies" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/wp-login.php</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="TestPlan.comments">Before we can perform a login action we need to set some cookies using this page</stringProp>
</HTTPSamplerProxy>
<hashTree/>
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="ThinkTime1s" enabled="true">
<intProp name="ActionProcessor.action">1</intProp>
<intProp name="ActionProcessor.target">0</intProp>
<stringProp name="ActionProcessor.duration">0</stringProp>
</TestAction>
<hashTree>
<UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="URT" enabled="true">
<stringProp name="ConstantTimer.delay">1000</stringProp>
<stringProp name="RandomTimer.range">100.0</stringProp>
</UniformRandomTimer>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Login" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Variables pré-définies" enabled="true">
<collectionProp name="Arguments.arguments">
@@ -184,7 +235,7 @@
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.domain">${url.host}</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
@@ -203,7 +254,7 @@
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="ThinkTime1s" enabled="true">
<intProp name="ActionProcessor.action">1</intProp>
<intProp name="ActionProcessor.target">0</intProp>
<stringProp name="ActionProcessor.duration">0</stringProp>
<stringProp name="ActionProcessor.duration">100</stringProp>
</TestAction>
<hashTree>
<UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="URT" enabled="true">
@@ -216,7 +267,7 @@
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Variables pré-définies" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.domain">${url.host}</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
@@ -246,12 +297,12 @@
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="ThinkTime1s" enabled="true">
<intProp name="ActionProcessor.action">1</intProp>
<intProp name="ActionProcessor.target">0</intProp>
<stringProp name="ActionProcessor.duration">0</stringProp>
<stringProp name="ActionProcessor.duration">100</stringProp>
</TestAction>
<hashTree>
<UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="URT" enabled="true">
<stringProp name="ConstantTimer.delay">1000</stringProp>
<stringProp name="RandomTimer.range">100.0</stringProp>
<stringProp name="ConstantTimer.delay">10000</stringProp>
<stringProp name="RandomTimer.range">200.0</stringProp>
</UniformRandomTimer>
<hashTree/>
</hashTree>
@@ -266,7 +317,7 @@
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.domain">${url.host}</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
@@ -291,23 +342,40 @@
</HeaderManager>
<hashTree/>
</hashTree>
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="ThinkTime1s" enabled="true">
<intProp name="ActionProcessor.action">1</intProp>
<intProp name="ActionProcessor.target">0</intProp>
<stringProp name="ActionProcessor.duration">100</stringProp>
</TestAction>
<hashTree>
<UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="URT" enabled="true">
<stringProp name="ConstantTimer.delay">10000</stringProp>
<stringProp name="RandomTimer.range">100.0</stringProp>
</UniformRandomTimer>
<hashTree/>
</hashTree>
</hashTree>
<DurationAssertion guiclass="DurationAssertionGui" testclass="DurationAssertion" testname="Duration Assertion" enabled="true">
<stringProp name="DurationAssertion.duration">500</stringProp>
</DurationAssertion>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Get posts" enabled="true">
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Get posts " enabled="true">
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<intProp name="LoopController.loops">-1</intProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">10</stringProp>
<stringProp name="ThreadGroup.num_threads">15</stringProp>
<stringProp name="ThreadGroup.ramp_time">5</stringProp>
<longProp name="ThreadGroup.start_time">1373789594000</longProp>
<longProp name="ThreadGroup.end_time">1373789594000</longProp>
<boolProp name="ThreadGroup.scheduler">true</boolProp>
<stringProp name="ThreadGroup.duration">60</stringProp>
<stringProp name="ThreadGroup.delay">5</stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<stringProp name="TestPlan.comments">Virtual Users requesting the posts.</stringProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">false</boolProp>
<boolProp name="ThreadGroup.delayedStart">true</boolProp>
</ThreadGroup>
<hashTree>
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
@@ -325,33 +393,12 @@
<stringProp name="HTTPSampler.response_timeout">30000</stringProp>
</ConfigTestElement>
<hashTree/>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value"> Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:48.0) Gecko/20100101 Firefox/48.0</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value"> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value"> fr,en-US;q=0.7,en;q=0.3</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value"> gzip, deflate</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Home Page" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Variables pré-définies" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.domain">${url.host}</stringProp>
<stringProp name="HTTPSampler.port">${url.port}</stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/</stringProp>
@@ -377,8 +424,12 @@
</UniformRandomTimer>
<hashTree/>
</hashTree>
<DurationAssertion guiclass="DurationAssertionGui" testclass="DurationAssertion" testname="Duration Assertion" enabled="true">
<stringProp name="DurationAssertion.duration">500</stringProp>
</DurationAssertion>
<hashTree/>
</hashTree>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
@@ -391,7 +442,7 @@
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>false</dataType>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
@@ -405,12 +456,62 @@
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<url>true</url>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
<DNSCacheManager guiclass="DNSCachePanel" testclass="DNSCacheManager" testname="DNS Cache Manager" enabled="true">
<collectionProp name="DNSCacheManager.servers"/>
<boolProp name="DNSCacheManager.clearEachIteration">true</boolProp>
<boolProp name="DNSCacheManager.isCustomResolver">false</boolProp>
</DNSCacheManager>
<hashTree/>
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true">
<collectionProp name="CookieManager.cookies"/>
<boolProp name="CookieManager.clearEachIteration">true</boolProp>
<boolProp name="CookieManager.controlledByThreadGroup">true</boolProp>
</CookieManager>
<hashTree/>
<ResultCollector guiclass="AssertionVisualizer" testclass="ResultCollector" testname="Assertion Results" enabled="true">
<boolProp name="ResultCollector.error_logging">true</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<url>true</url>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="TestPlan.comments">For scripting only</stringProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
+2 -2
View File
@@ -435,7 +435,7 @@ Refer to the [documentation on using an external database with WordPress](https:
This chart provides support for using Memcached to cache database queries and objects improving the website performance. To enable this feature, set `wordpressConfigureCache` and `memcached.enabled` parameters to `true`.
When this features is enabled, a Memcached server will be deployed in your K8s cluster using the Bitnami Memcached chart and the [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/) plugin will be activated and configured to use the Memcached server for database caching.
When this feature is enabled, a Memcached server will be deployed in your K8s cluster using the Bitnami Memcached chart and the [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/) plugin will be activated and configured to use the Memcached server for database caching.
It is also possible to use an external cache server rather than installing one inside your cluster. To achieve this, the chart allows you to specify credentials for an external cache server with the [`externalCache` parameter](#database-parameters). You should also disable the Memcached installation with the `memcached.enabled` option. Here is an example:
@@ -489,7 +489,7 @@ If additional containers are needed in the same pod as WordPress (such as additi
### Pod affinity
This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
This chart allows you to set your custom affinity using the `affinity` parameter. Learn more about Pod affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
As an alternative, use one of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/master/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters.