DevOps is a mechanism or methodology in which Development
and Operation teams work together. They work together in the whole SDLC to make
the quality product , enhance the team efficiency, and quick delivery and easy
roll back of the code if needed.
The first step in a project is Planning. After that
Development/coding , then testing and then deployment to production. There are
other steps in between each of these steps but in overall these are the major
steps.
So, when the code is in production, the operation team takes
care of the production code plus the customer feedback. If there is any issue
with the code in production environment or if customer is having any kind of
issue, customer’s feedback which could help enhance the product, those issues
and feedback have to be conveyed to the developer. If the developer is not
available or if the developer can not take care of the production issue
immediately then the operation team will have to wait for the fix. Similarly,
the Dev team has to wait for the operation teams feedback, or when operation
team reach out to the developer with issues, the developer might be working on
different code or different version or build. So the two teams are not in the
same page. Hence there is inter dependencies of the development team and the
operation team.
To overcome this problem, a new concept was brought in which
is DevOps. In this, the dev team and the operation team work together. The code
is deployed simultaneously on the dev environment and the production
environment. And the testing is carried out simultaneously. And whatever issue is noticed, they are taken
care immediately. So, there is more rapid integration and deployment. In other word, more rapid Develop, Test and
Deploy.
DevOps is a tool which implements continuous integration and
continuous deployment. This covers the entire SDLC. Sometimes DEVOPS is also called as extension
of Agile.
Agile contains these steps : Plan , Code , Build, Test
DevOps contains above steps plus : Release , Deploy, Operate,
Monitor
There are many tools take part in the process of CI/CD.
Plan
Code : Eclipse , git, jira
Build : Maven
Test : Selenium , Junits
Release : Jenkins, Bamboo
Deploy : Puppet
Operate :
Monitor: Splunk
In Devops, testing is
carried out quite often and at every steps. So , the term continuous testing
is used in DevOps .
CI/CD : Continuous Integration and Continuous Delivery/Deployment:
CICD is the process of developing and deploying the code
rapidly. In this process , the code is small piece of code and they are fixed
and deployed quite often , sometimes more deployments happen in a single day.
This way, the defect is found and fixed quickly and easily. And the product is
more stable.
Azure :
Azure is a cloud computing platform that is owned by
Microsoft . Azure provides you the cloud
services. The components/services of Azure :
Azure Pipelines
Azure Repos
Azure Boards
Azure Artifacts
Azure TestPlans
Azure Repos : This is a repository of Azure. It is like GitHub(both are microsoft products) where you can store, pull , push, commit your codes. You can also branch the repo like in GitHub.
Azure Boards : It is a dashboard to display the activities
or updates of the SDLC in Azure, it tracks the activities.
Azure Artifacts : It keeps track of SDLC artifacts, maintain and share your project.
Azure Test Plan : This helps you develop your testing plans,
ie, plan your test.
Azure Pipelines : This works as a pipeline to connect the CI
and CD. It connects two different working environments or clouds. Continuous
integration is code development , fixing, testing activities. When the code is deployed
, it is made available to the azure environment through pipeline. Azure pipeline integrates with the Version
control systems such as GitHub, Subversions or other systems. It take the
latest CICD code from there.
Azure pipelines supports almost all languages: Java, Python,
C++, C#, PHP, .NET etc.
Azure pipelines is platform independent, it provides you all
kinds of operating platform.
Your run or deploy your code to any targets such as any
virtual machines, or other clouds.
Azure pipeline supports your open sources applications.
Azure Devops- practical steps:
In Azure dashboard:
1.
For first time users, need to create an organization.
2.
Create a project > you can delete the project as
well.
3.
Choose to keep the project private or public
4.
Inside the project you can find the 5 services : Azure Pipeline, Azure
Repos, Azure Boards, Azure Artifacts , Azure TestPlans
5. Here
you can click the service you want.
Azure PipeLines
1.
Click Pipelines, click Create new pipeline
2.
Choose where is your code located : Github or Bitbucket cloud, Azure
Repos Git and other options are there.
3.
Let’s select Github for example.
4.
You get the list of repositories, select the right one.
5. Once
code is open , there is run button available to run your code.
6. Once
run is complete , it provides you the log of the execution.
7. The
result part has three sections, logs, summary and tests.
8. Click
Release button if you want to deploy your code to some other targets available
there.
9. Click
Overview on the left hand bar , it displays the project status.
10. Dashboard
on the left hand side bar shows the history of activities. If there is nothing
in the dashboard, then you need to add a widget. Click add a widget button and
then select and add a widget. Then go to the dashboard again, click the recent
activity and it shows the activity in the widget.
11. Click
Pipeline, and you can update your code here.
12. Fork
means make copy of the code, make changes and then commit to the master code,
master is the latest executable code with proper access and rights.
Azure Test Plan
1.
Open your project in Azure.
2.
Click Test plan.
3.
Click New Test Plan
4.
Give test plan name --- to create
new test plan, and click Create
5.
After test plan is created, inside
you will see tabs:Define , Execute , Chart. If you compare with QC, Define is
like test plan, Execute is like Test Lab.
6.
Click Define --- you will see
options to create Test Suite, Assign Configurations, Export, Assign Testers to
run all tests, Import Test Suites.
7.
Click Test Suite --- There are three
categories displayed: Static , Requirement based and query based.
8.
Static suite : Click Static suite and give it a name.---now you can add
test cases to this test suite, new test case or existing test case.
9.
Click create new test case, same
like in QC, you give the test case name, steps, expected results.
10.
To add existing test case, click add
existing test case , check the parameters available there, make change as per
your project if needed. You can add new clause(parameter )if needed. Click RUN
button , then you see the set of existing test cases.
11.
Select test case and click on ADD.
12.
Now you suite will have the test
cases , this way you can create this suite.
13.
Requirement based Suite : click action menu , click new suite and click Requirement
based suite.
14.
Check the parameters available
there, make change as per your project if needed. You can add new
clause(parameter )if needed. Click RUN Query button , then you see the set of
requirements.
15.
Select the requirement for which you
want to create test suite and click Create Suite.
16.
It automatically displays the
existing test cases related to the requirement. You can also create new test
case. This way you can create Requirement based suite.
17.
Query based Suite : click action menu , click new suite and click query based
suite.
18.
Check the parameters available
there, make change as per your project if needed. You can add new
clause(parameter )if needed. Click RUN Query button , then you see the set of
test cases based on the conditions/clause.
19.
Select the number of test cases you
need and click Create Suite.
20.
It displays the test cases you have
selected. This way you can create Query based suite. You can edit this suite
also by clicking Edit query.
21.
Adding Configurations: To assign configuration to any test suites , click action
menu next to the test suite , click Assign Configuraiton.
22.
The configuration is a tab on the
left hand side of Azure portal where you can see other components like
pipelines, Artifacts etc. In configuration , you configure the environment or
browser or platform etc. When you click step 21, you get the configurations
present in here.
23.
Now, you pick the configuration .
Then all the test cases in the suite adopt the configuration/s selected . which
will be visible under configuration tab inside EXECUTE tab. That means the
respective test cases, displayed in execute tab, will run on those respective
configuration.
24. Common/Shared steps in Test Case : Some steps are common to more than one test
cases. To declare the common steps, click on the bar BOARD(The Borad is a tab
on the left hand side of Azure portal where you can see other components like
pipelines, Artifacts etc.). Then click on Work Items , test cases are
displayed. Click the related TC. Test steps are displayed. Selects the common
steps and click on icon “create shared steps”. Give name to the shared steps.
You can create new test case in work item. Let’s use the shared step. While
writing the TC step, click on the icon “insert shared steps” , click RUN QUERY button. Shared steps is
displayed. Select it and click “insert shared steps”. It is inserted. To see
steps inside the shared steps, double click on it. Now continue writing other
steps with expected results. SAVE it, a new test case with shared steps is
created.
24.
On the main dashboard if you click
on “Work items”, you can see your shared steps also.
25.
Parameterization: You can create parameterized test case. To parametarize
values, click on Test Plan, click on Parameters. Click + icon to add
parameters. Give column names , each column name is one parameter. Give values
to the respective parameters/columns. Save the parameters clicking icon next to
+. In the test case steps you mention the parameterized values with
@columnName. As soon as you complete the steps , you see a new table created in
which you can see the parameters and you can map from here. After mapping click
Save and Close. When executed , you get different sets of test execution based
on the input of the parameterized values.
26.
Grid View(To view and to import test
case from excel) : Grid view shows test case in excel
format. It has ID, Title, Step Action, Step Expected Result, State and Assigned
To. This GRID option is to import test
cases from excel. But you do not directly import. You create test cases in the
excel in the format of Azure , ie, with 7 columns. Then copy the test case from
excel and paste in Azure Grid. Then save it.
27. Result Analysis: To
analyze test result, specially failed test case, go to particular test case.
Double click, opens the test case in new window. Double click again. Now, you
see the detail of the test case in a new window where you can expand the data
and analyze them.
Azure Repo is Azure Repository where you store , commit, pull , push and manage
your code. Azure Repo maintains version control of your code , means, you can
track every changes in your code , time and who did the change . It is like GitHub. And both GitHub and Azure are microsoft cloud services.
You can branch the master code (master branch and feature
branch)and different team members can work on their individual branch . After
they are done , they merge their code to the master branch. You are provided
with tag feature to manage the version control.
Git is distributed version control system(There is local and
remote repositories) like SVN where each user has their local repository and
there is a central repository. TFS , Team Foundation Server- Azure DevOps server was previously called TFS, is centralized version control system. There
is only one local repository , every time you update your code, you have to
push to the central repository.
Azure Boards: it is a platforms which keeps track of all the
activities in Azure. Activites such as dealing with tasks or issues or
deployments, tracking of sprints etc.It combines all the Azure services
together ie pipelines, artifacts, repos, test plan.
Azure artifacts : This keep track of all the Azure-Devops SDLC
artifacts such as approval, pending, closed etc.
In progress....
No comments:
Post a Comment