Life Cycles, Testing, DevOps Flashcards
Software Development Life Cycle phases
- Analysis of existing system:
- System requirements are identified: Propose new features, address concerns
- Proposed System is defined: Overall design is developed, stack is chosen
- New system is developed: Actual coding/implementation
- Testing/Integration: Test your new features, compatability
- Maintenance/Monitoring: Report deficiency, Use info to start new cycle
Software Testing Lifecycle -STLC
1 Planning/Analysis: What needs to be tested? Is it testable?
2 Design: How to setup tests? Automated? What frameworks?
3 Develop your test cases: Write code for your tests. Find edge cases. Cover all
4 Choose an environment for your tests: What software/hardware ru using to test
5 Test Execution: Run your tests
6 Conclusion/Wrap up: Generate a report of findings
Defect Life Cycle
New - bug/defect detected
Assigned - Assigned to a developer
Rejected - Defect is thrown out for various reasons. Not a real problem
Deferred - Defect is put off for various reasons. Is it really a problem?
Test/Fix - Test the cases and attempt to fix the defect
Reassign - Failed to fix. Might not have been assigned to right developer
Verified - Other developers will verify the bug is fixed. If not, it moves back to Fix
Closed - Bug is documented as fixed
Testing Vocabulary
Test Case: Set of inputs and conditions with expected results
Test Suite - A group of test cases related to each other (same functionality)
Testing Docs:
- Test Strategy - Document that sets the standard for testing process
- Test Plan - Document that tells us what to test how who will test
Types of Testing
White Box Testing: Testing based on a knowledge of the internal code. Low level
Black Box Testing: Testing an application without knowing how it works.
Functional Testing: Test to see if software does what it is supposed to.
Functional Testing
Functional Testing: Tests to see if software does what it is supposed to.
- Unit Testing - Testing of the individual atomic aspects
- Component Testing - Testing components. Comprised of several methods(units)
- Integration Testing - Done to expose deficiencies between code components
- API Testing - Testing an entire process, probably involves several moving parts.
- System Testing - Testing a complete software application
- Acceptance testing - Ensure final complete piece of software as desired(Human)
Non-functional Testing
Testing for non-functional aspects of the application. (The application works but is it ) : Usable, performant, Reliable;
Usability Testing
Testing an application for user friendliness.
- Done by a human. - functions, but hard to use for whatever reason -UAT user acceptance testing: Whether a user would want to use an application.
Performance Testing
Testing responsiveness, stability and efficiency
- Load Testing - Testing a system and evaluating its behaviors under heavy use
- Stress Testing - Evaluates if the system behaves appropriately, under stress
- Endurance Testing - Can the app run for prolonged periods under heavy use?
- Spike Testing - Testing to see how the app deals with sudden usage surge.
Reliability Testing
Tests whether the software can perform failure free operations for a length of time.
- feature testing- test that a features operations are all executed properly
- Load Testing(variation) - test if the software is degrading over time
- Regression Testing - Make sure new bugs havent been introduced with new code
Regression Testing
Incremental testing of software to ensure that new additions to the software do not break existing functionality.
Type of reliability testing
Testing Automation
Using software to perform manual testing
- cuts down testing time - tests are repeatable - After hours of testing - Increase code coverage - Time/Cost to produce these tests can be significant
Positive/Negative Testing
Positive Testing: Testing to see that a certain procedure succeeds
- user enters valid data
Negative Testing: Testing to see that a certain procedure fails
- User enters invalid data - Negative tests don't fail, just the procedure they test fails
Alpha Testing/ Beta Testing
Alpha Testing: Testing an application how an end user might use it.
- Conducted by internal employees
Beta Testing: Releasing the software to a limited number of expected users who have no connection to the development process
Smoke Testing/ Flaky tests
Smoke Testing: Running tests just to see if your application is even in a state to be tested
Flaky Tests: Tests that have different outcomes given the same base conditions
Defect /Bug
When the software doesn’t behave as intended, often in detrimental way
- Severity - How much does the feature get compromised when it fails
- Priority - How pressing is it that a defect be corrected?
High severity/High Priority
Low severity/High Priority
High severity/Low Priority
Low severity/Low Priority
Testing pyramid
-
- -- - ------ - -manual ui-- - --Automated ui---- - -automated Integration-- - --Automated Unit Testing---
DevOps
Methodology that combines development and operations(maintaining Infrastructure)
Goal is to more efficiently produce high quality code and seamlessly transition that code into a production state.
Centered around CI/CD/CD
Continuous integration
Process of continually checking code into the central repository and checking if it integrates into the code base.
-Make frequent changes to the code, then push to a repository like github and then there is an automated build process.
Example technologies: Jenkins, Travis, Github Actions
Continuous Delivery
The ability to have code ready for production in a way that is often automated
Release of the application to customer/production is often ready at the press of a a button
This means tests have passed and it is ready to go
Continuous Deployment
This is similar to continuous delivery, except the code to constantly being deployed to the customer/production. If all tests pass, then the code gets deployed.
DevOps Pipeline
is an automated set of processes that use tools to compile, build, test and deploy our application
-Amazon Web Service- AWS (Or any competing: Azure, google cloud) and other cloud computing
Cloud Computing
Important part is that we are accessing infrastructure over the internet
Nothing is stored/managed locally, except perhaps interfaces to access some resources.
This is beneficial because you pay for exactly what you need and don’t have to maintain any of the needed infrastructure.
Elastic Compute Cloud(EC2)
Virtual Server- A computer running somewhere else, owned by Amazon, accessible virtually.
This allows us to maintain an ongoing server(an application running on a server)
24/7 without using our own resources.
This computer can operate at its own speeds, not yours.
Simple Storage Service(S3)
Highly scalable file storage
Only pay for what you use
High durability (11 9s -> 99.999999999%) and availability
Can also act like a Static Web Host(Original purpose)
Jenkins
Continuous Integration Tool
Open source automation server
build automation tool
- support for automating the process of building and deploying applications
Helps to achieve CI and can assist with CD\CD
Can include additional plugins to integrate with other technologies
- github and slack
Linux OS
- Not very popular operating system for personal desktops
- Lightweight
- Greater level of control
- Open Source, which means it can be adapted to specific means
- Free!
Build Automation/ Dependency Manager (for our Application)
Maven to help aid in the compile, build or package process
Server
ie Tomcat
Web Container, environment that we are going to manage our Jenkins(can also be used to deploy our application)
Sonar
Static code analysis tools
Code quality analysis tool which exposes “code smells”
- Code smell: This is code that isn’t wrong per se, just bad practice.
- commented out code, sysout() statements
SonarQube: Central server which processes full analyses, which build into pipeline
SonarCloud: Cloud-Based system where you can configure and view the applications code analysis on the cloud-> integrate into Github rep
SonarLint: In the IDE, portions of code will be underlined if there is an issue
Accessing your AWS Ec2 and giving credentials by command line
In the command line access the folder where you have your key that you downloaded when setting up EC2 / Or enter the file path in the command line.
Then type: ssh -i (name of key file) (username) ec2-user@(Ipv4 address)
You should copy the public IP address from the instance information screen and then paste it after @
You can also do with putty: provide the key and user name in ui.
or just select the instance and hit connect from the AWS instance page
linux grep & other commands
Global regular expressions print: use it to search a file or multiple files with * -i: case insensitive pwd- print working directory. cd : back to ~ man(ual) : tell you about command clear puts cursor at top of terminal cat: concatenate touch creates new file mkdir : make new directory chmod: change permissions yum: linux package manager curl: transfers files