400 likes | 584 Views
Acctesting Test Campaign Edition Continuous Delivery. Turcu Cristina TE-MPE On behalf of the TE-MPE-MS Software Team Technical meeting 16.01.2014. Content. Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 2. Situation.
E N D
Acctesting Test Campaign Edition Continuous Delivery Turcu Cristina TE-MPE On behalf of the TE-MPE-MS Software Team Technical meeting 16.01.2014
Content Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 2
Situation • Accelerator testing Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 3
Situation Tests • 3 steps for validating a test: • Test execution • Test analysis • Test signing Test-Phases. Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 4
What is a Campaign ? • Campaign: contains the necessary tests in order to determine if a system/circuitis safe for running. • Test Plan: defines which tests have to be executed for which systems during one test campaign. Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 5
Content Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 6
Test Campaign Edition Why we need it? • Before • Edit the test plan by directly editing the Database (DB) • Security or consistency problems • More flexibility needed • Improvements: • Editing the test plan without directly editing the DB • Impose restrictions on editing the DB, using Role Base Access Control (RBAC) • Allows many campaigns and keeps the history of them • Allows different system types, not only Circuits as before Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 7
Status New GUI Panel GUI Panel GUI Panel Core Layer Persistence Layer Data Migration Old DB New DB (LSA account ‘owned’ by CO) (dedicated DB account) Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 8
Content Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 9
Acctesting - new features • Campaign history • Campaign browsing • Display and edit old campaigns Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 10
Acctesting - new features • Create, Delete and Edit selected campaign Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 11
Acctesting - new features • Enable/Disable single test Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 12
Acctesting - new features • Systems are grouped and can be activated/deactivated by test types Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 13
Content Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 14
Acctesting Outlook Next Steps: • Waiting for user feedback • Will be used for this Hardware commissioning • Server is operational in development (dev) environment, but the GUI parts can’t be release for the moment • waiting for some release features from CO Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 15
Content Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 16
Continuous Delivery • What it is? • represents a series of practices to ensure the code can be rapidly and safely deployed for operation by delivering every change to a production-like environment after all the necessary tests passed. • Why do we need it? • To always have the latest product version potentially deliverable • For a simple and fast deployment. Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 17
Content Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 18
Project dependencies • Common build • 45 projects • Respect order • Time: ½ day Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 19
Content Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 20
Continuous Delivery • Continuous delivery: • Used by many companies • Has proven its efficiency Commit on Revision control software (SVN) Automatic build using a Continuous integration server Manually deployment dev Junit: Unit tests Integration tests Functional tests Acceptance tests pro Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 21
Commit a server change • Commit to SVN • generate a snapshot of the application (Tarball (.tar)) • use to deployment on the node (development/production) • attaches version of the DB and the server to the Tarball • usefull in case of a rollback, so we know which version of the server is compatible with witch version of DB Automatic build using a Continuous integration server Manually deployment Commit on SVN dev Junit: Unit tests Integration tests Functional tests Acceptance tests pro Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 22
Bamboo • Continuous integration server. • Buildsthe project and runs the tests whenever a developer commits an update • Continuously tests the software Automatic build using a Continuous integration server Commit on SVN Manually deployment dev pro Source Control Developers Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 23 Agents
Bamboo Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 24
Bamboo • The system is working when all the builds are green • a problem can be spotted quickly • provides the root cause of the error • stack traces • Provides statistics • build duration • number of failures /build • successful buils/time • time to fix, etc Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 25
Bamboo • Integration • Jira (able to associate task with builds), Fisheye(a source history with hooks into Jira), Crucible (assists in code reviews), Clover (monitors code coverage in the build) • Build systems: Ant, Maven, Make, Command Line Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 26
Bamboo • Crucible - assists in code reviews Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 27
Unit Tests • JUnit – framework for writing tests • Unit tests: • Test small unit of functionality • Everything is done in the memory(no DB, no network) • Uses mocks • Benefits • Formalize requirements • Write and debug code easily, fewer bugs • More maintainable code Automatic build using Bamboo Commit on SVN Manually deployment dev Junit: Unit tests Integration tests Functional tests Acceptance tests pro Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 28
Integration Tests • Integration tests • Test of how well classes work together • Environment(accessing DB, connecting to server..) • Purpose • find bugs that unit tests can't detect • To verify • Functionality • Performance • Reliability Automatic build using Bamboo Commit on SVN Manually deployment dev Junit: Unit tests Integration tests Functional tests Acceptance tests pro Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 29
Functional & Acceptance Tests • Functional tests • check a particular feature for correctness by comparing with the specification • don't concern on intermediate results • Acceptance tests • particular type of functional test • illustrate the user stories • ensure that all the software features are complete Automatic build using Bamboo Commit on SVN Manually deployment dev Junit: Unit tests Integration tests Functional tests Acceptance tests pro Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 30
Deployment • Information about the state of the server: • what version of the DB it is used • what version of the server has been deployed • What we improved • possibility to specify the environment to deploy the server: pro / dev • ability to see all succesful deployments. Automatic build using Bamboo Commit on SVN Manually deployment dev Junit: Unit tests Integration tests Functional tests Acceptance tests pro Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 31
Deployment Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 32
Deployment Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 33
Deployment Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 34
Deployment • aaa • Four Steps (done automatically): • 1. Stop server • 2. Migrate the DB • 3. Deploy the server • 4. Start server Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 35
Content Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 36
Summary • generate a Tarball • (.tar) • attaches version of • the DBandthe • server tothe Tarball Deploy using Bamboo Commit on SVN Build using Bamboo Stop server Migrate the DB Deploy the server Start server dev Junit: Unit tests Integration tests Functional tests Acceptance tests pro Manually selecting the environment, the release and starting the deployment. Automatically Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 37
Content Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 38
Outlook • In place for: • Acctesting server • To be extended to: • RDA3 server • PC Interlock server • System management server • Analysis server • Plan: • Have continuous delivery for the GUI • Improve DB rollback Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 39
Thank you for your Attention! • Questions? Turcu Cristina | TE-MPE | Acctesting Test Campaign Edition & Continuous Delivery 40