Category: Microsoft Azure

  • How To Optimize Automation Using Azure DevOps

    How To Optimize Automation Using Azure DevOps

    Before doing all these we need to write test cases that contain test steps. The Test Steps describe the execution steps and expected results for each test step. The results of the comparison between the expected and actual outcomes are used to mark each step as pass or fail.

    azure devops dashboard
    login into dynamics window

    Save test case and copy its id.

    Now we need to associate this test to our unit project for it we need to place code on the repository. From the test explorer, we need to associate the test as below.

    associate the test case
    create in azure DevOps’s test case

    You need to add the ID of the test case created in azure DevOps’s test case.

    test case in ID column directly opens into azure DevOps

    You got the link of a test case in ID column which directly opens into azure DevOps.

    Here we are ready enough to use one of the most useful features of DevOps which provide true automation. The Azure Pipelines service enables you to automatically build, test, and make your code available to other users. It works with almost any type of language or project. Azure Pipelines combines continuous integration (CI) and continuous delivery (CD) to continuously test and build your code, and then deliver it. 

    Azure Pipeline is its self topic which I will cover in the next blog. Here I would like to discuss the pipeline that will automate the test cases.

    create a configuration of test plan in Azure DevOps

    Before creating a pipeline we need to create a configuration of test plan in Azure DevOps. The configuration is a platform on which the test code will run. Like which OS to use, which browser to use, etc. All these definitions provided in the configuration.

    configuration to run its test cases.

    We need to assign a configuration to test suits so suits will use configuration to run its test cases.

    add test cases into a pipeline and configure

    Now we are good to use the pipeline’s vsTest task add it into a pipeline and configure it below.

    Select test plan from the dropdown, select test suits, and select test configuration.

    check Test mix contains UI test as it is automation we need to check this.  

    Save and queue the pipeline and run it

    Save and queue the pipeline and run it. you can see real-time logs as tasks are running.

    get a summary of test cases

    We can get a summary of test cases also we can get logs of fail test cases. All these features going to provide ease in the development process and help develop more effective softwares.

  • Steps for Changing Azure Log Analytics Retention Period

    Steps for Changing Azure Log Analytics Retention Period

    This optimization involves customizing retention periods for different log types based on their criticality and ensuring that you adhere to any regulatory compliance requirements.

    What is Azure Log Analytics?

    The Azure Log Analytics tool is used to edit and run the log queries. This tool analyzes the result of the data which is gathered by Azure Monitor logs. Log Analytics queries let you find trends, identify patterns, and extract a variety of operational insights from your data by retrieving records that meet specific criteria.

    What is Azure Log Analytics Workspace?

    Log Analytics Workspace is a dedicated container of the Azure environment. It is primarily designed for storing log data from Azure Monitor and other Azure services. Microsoft Sentinel and Defender for Cloud are examples of Azure services. As each workspace has its own configuration and data repository from several services can be combined.
    In essence, Azure Log Analytics is the service that powers log management, while the Azure Log Analytics Workspace functions as the dedicated storage and analysis environment for your log data.

    Log Analytics Retention Period: Optimizing Storage for Your Needs

    The concept of Log Analytics retention period refers to the duration for which data is stored within your Log Analytics Workspace. This timeframe plays a crucial role in balancing cost-efficiency and data availability for effective application monitoring. Typically Azure Log Analytics Retention Period is up to 90 days. However, it can be extended and customized. The cost of Log Analytics depends on the pricing tier, data retention, and solution requirements. When you adjust or decrease the log analytics retention setting in Azure Monitor, the data will be stored for 30 days before it is completely deleted. It allows users to undo the changes and prevent data loss due to configuration errors. However, if it is necessary, the data can be deleted immediately. Likewise, if the user increases the log analytics retention setting, it will apply to all existing data in the table that has not been deleted yet.When archive settings are modified the data and pertinent data stored in the table will be affected immediately. Through the Azure portal, you can configure a Log Analytics workspace’s default retention duration to anywhere between 30 and 730 days.It’s important to distinguish between retention and archive settings. While retention determines how long data is stored within the workspace, archive settings define how long data is accessible for querying after it’s purged from the primary storage. Any modifications to archive settings take effect immediately for the affected data tables. To change the data retention term, you must upgrade to the premium tier.

    Here are the steps for the Log Analytics Retention Period:

    Step 1: Log into the Azure Portal.

    Step 2: Navigate to Log Analytics Workspace (select your workspace).

    Step 3: Under General>> Click Usage and Estimated Costs.
    Click Usage and estimated costs
    Step 4: Under usage and estimated cost select data retention.
    Under usage and estimated cost select data retention
    Data retention by default is set as 30 days you can change it according to your need.
    Set Data retention
    Note: Insight data types are retained for 90 days by default, using workspace retention if they are over 90 days old.Step 5: Click OK to save your changes.If you want to set the different retention period table, then follow the below steps.A list of important factors to consider when retaining data.Changing the retention at the workspace level will change the table retention any longer on the one previously modified for this, you will need to use some simple ARM commands.

    1. To continue we need to know the resource id first to retrieve the Log Analytics workspace resource id.
    2. To get that id navigate to resource explorer.
    3. Under resource explorer.
    4. Select your subscription and then select the resource group.

    Select your subscription and then select the resource group
    Step 6: Once you get the resource explorer click on subscription and then navigate all the resources till the one you want to operate on.
    Once you get the resource explorer click on subscription and then navigate all the resources
    Step 7: Now that we have the workspace resource-id, you just need to add the table name and API information to run the necessary command.
    By running the GET command throughARMClient, passing the resource id

    ARMClient.exe get “/subscriptions/9df78e42-893b-4152-b04ff80674a99c67/resourceGroups/SmartAppsCOM-rg/
    providers/Microsoft.OperationalInsights/workspaces/sa-production-loganalytics/Tables/AzureDiagnostics?api-version=2017-04-26-preview”

    Now that we have the workspace resource-id, you just need to add the table name and API information to run the necessary command.
    add the table name and API information
    Step 8: Now when we get the retention period we can set the retention according to our need by below the ARM command.
    ARMClient.exe put “/subscriptions/9df78e42-893b-4152-b04f-f80674a99c67/
    resourceGroups/SmartAppsCOM-rg/providers/Microsoft.OperationalInsights/workspaces/sa-production-loganalytics/tables/InsightsMetrics?api-version=2017-04-26-preview” “{‘properties’:{‘retentionInDays’:7}}”
    get the retention period

    Step 9: But if you want to set it back. You can use a null value. Use below command

    ARMClient.exeput”/subscriptions/9df78e42-893b-4152-b04f-f80674a99c67/resourceGroups/SmartAppsCOM-rg/providers/Microsoft.OperationalInsights/workspaces/sa-production-loganalytics/Tables/InsightsMetrics?api-version=2017-04-26-preview” “{‘properties’:{‘retentionInDays’:null}}”

    We are done with the retention period.

    Optimizing Log Analytics Retention for Cost-Effective Monitoring

    Optimizing Log Analytics retention in Azure is crucial for effective data management and cost control. The balance between cost-efficiency and data availability empowers businesses to make informed decisions regarding application health. Organizations can even customize their data retention strategies to meet specific requirements by changing retention settings at both the workspace and table levels. This ensures that valuable insights are retained while minimizing unnecessary storage costs.If your business struggling with Log Analytics retention and seeking a log management solution. Then you’ve come to the right place. For all you need, seasoned engineers at MoreYeahs provide Microsoft Azure Consulting Services and help you meet the highest standards of performance.Let’s Connect.

    FAQ

    1. How do I change my default retention policy?
    If you want to change the default retention policy in Log Analytics Workspace here are the steps:

    • • Select your workspace in the Azure Portal
    • • Go to General Settings
    • • Modify the data retention duration to suit your needs

    2. What is the default retention policy for log analytics workspace?
    The default retention policy for log analytics workspace is usually 30 days. However, it can be altered and expanded as per the unique requirements.
    3. What is the duration of log retention?
    The default retention policy for log analytics workspace is usually 30 days. However, it can be altered and expanded as per the unique requirements.
    4. Why is log retention important?
    Log retention is essential for compliance, auditing, troubleshooting, and historical analysis purposes. It makes sure that log data are kept for the specified time which helps businesses meet regulatory requirements and gather insights about system behavior over time.
    5. What are the default log retention hours?
    Depending on the log source and configuration the default log retention hours can be changed. Logs are typically stored for 720 hours however; this can be changed as per the requirement to meet Azure Log Analytics Retention Time.
    Must Read the Other Articles on Azure:

  • What Is Microsoft Azure Used for [2021]

    What Is Microsoft Azure Used for [2021]

    Microsoft Azure allows users to utilize Microsoft’s cloud services and resources to store and manage data. Additionally, It supports many programming languages, such as Java, C#, and Node Js.

    What is Microsoft Azure Used for?

    Companies and enterprises across the globe use Microsoft Azure for computing, networking, IoT, artificial intelligence, storage, integration, security, developer tools, DevOps, web services, and other machine learning.

    Azure users can not just develop, test, and host web applications to keep them running without interruptions. They get a data storage facility, can create virtual machines, integrate virtual devices and directories, collect and save metrics,

    Is Microsoft Azure Free?

    The best thing about Microsoft Azure is that it’s free to start and utilizes a pay-per-use model. Simply put, users only pay for the required services.

    Users get free access to multiple products— Linux Virtual Machines, Windows Virtual Machines, Managed Disks, Media Services-Encoding, Load Balancer, Blob storage, File Storage, SQL Database, VPN Gateway, Azure Database for PostgreSQL, and many more.

    How Many Customers Does Azure Have?

    More than 94% of Fortune 500 hundred companies employ Microsoft Azure to meet their cloud computing requirements. Microsoft Azure doesn’t reveal the number of current customers. But as per Microsoft’s 2020 Q2 report, Azure revenue growth is on the rise, and enterprise adoption was up 3% to 55% in a year.

    Why Microsoft Azure?

    Azure is the ultimate solution that offers advanced site recovery, unmatched flexibilities, and built-in integration to perform backup and disaster recovery seamlessly.

    Azure users can host and build adaptive web and mobile apps to accelerate business operations, leverage Active Directory integration and IoT industry solutions. 

    If you are also looking for a reliable and efficient cloud computing solution for your business, you can get a free trial and use Azure services.

    Moreover, you can connect with our Microsoft Azure Cloud Consulting Services to know more about Microsoft Azure and plan Azure implementation for your business needs.

    We create innovative and business-oriented Azure solutions for businesses and enterprises to help them optimize and streamline operations.

  • Integrate Katalon with Azure DevOps

    Integrate Katalon with Azure DevOps

    You need to have Katalon Studio version 7.0.0 or later to use the Azure DevOps extension.

    This extension is NOT available for Linux.

    Prerequisites

    • Must have a Trial or Valid License (Always use your business email for trial Account).
    • You must have an Azure DevOps Service Account with the required permissions.
    • Installation of Katalon for Azure DevOps extension.
    • Katalon Studio command for console mode execution.
    • The command will invoke Katalon Studio Tests task for execution so a Katalon build is needed for each execution.

    So, let’s begin, please follow the below steps.

    Step 1 –

    • I am assuming you have signup on the Katalon Portal with your business account and downloaded the latest Katalon Studio.

      In my case, I am using a trial license and Katalon Studio 7.3.1 to integrate Katalon with Azure DevOps. You can use a trial license which will provide access to all the features for a limited time period.

    Step 2 –

    • Install Katalon for Azure DevOps extension. Once you have installed the extension, you will need to configure to execute the Katalon Studio Tests task to complete the integration.

    Step 3 –

    • If you already have a repo for the Katalon project on Git or Azure, then go to step 4, otherwise follow the below steps.

      In Azure DevOps, I have created a separate Project for demo purposes. Inside that project, I have created a repository by importing a sample Webservice project from Katalon Git Repositories. You can use your own custom Katalon Project.

      You can also create an empty repository on Azure and make a clone on your local machine. After that put your katalon project in that folder and commit those changes.

    clone to your computer

    Step 4 –

    Regarding the Command Arguments, you can generate them from your Katalon Studio.

    Click on Build CMD icon in Katalon Studio Tool. Click on the Browse button and select your Test Suit. Click on the Generate Command button.

    Note: Please leave out any irrelevant arguments such as -runmode-apiKeyOnPremises, etc.

    Step 5 –

    Now go to Pipeline in Azure DevOps, and then click Add to add the Katalon Task.

    • If you are using Classic Editor to create a pipeline without YAML then you will get a screen like this. Click on the Add button after searching for Katalon.

    Now go to Pipeline in Azure DevOps, and then click Add to add the Katalon Task.

    Once you have added the task, you will need to define the version of Katalon Studio and the command arguments.

    You can give your project path as given below by adding the relative path of your .prj file to D:a1s.

    If you are using the Yaml option to create an azure pipeline. Search for Katalon and click on Task.

    If you are using the Yaml option to create an azure pipeline. Search for Katalon and click on Task.

    Now define the version of your Katalon Studio and Command Argument and click on Add button.

    define the version of your Katalon Studio and Command Argument and click on Add button

    Step 6 –

    Now Save the pipeline and run it manually.

     Now Save the pipeline and run it manually.

    I hope this blog post helped you to solve the problem. If you’re still experiencing the same or other issues, consider contacting our Microsoft Azure Managed Services. We have a team of certified developers who can quickly help you fix all kinds of Azure-related issues.

    In the next blog post, I’ll write down about Reporting in Azure DevOps using Katalon.

  • Project Development + Azure DevOps = Happy Developers

    Project Development + Azure DevOps = Happy Developers

    HOW AZURE DEVOPS CAN HELP?

    • Azure Boards:
      You have to accept that while working on the project your team need various tool to manage their work items. Azure Board going to provide your team bunch of tools and services that manage the work for your software projects. With integrated reporting, customizable dashboard, managing your scrums meeting.

    Azure Pipelines:
    This is the most exciting feature when it is an action that gives us the power to automatically build and test your project and provide it to other users as well. It flexible for any language or project type.

    You can test, build, and ship code continuously and consistently with Azure Pipelines using continuous integration (CI) and continuous delivery (CD).

    • Azure Repos:
      Manage your code with version control tools provides you trackability on every check-in check-out. Working as a team we always need version control for a project code. Its always good practice to implement it.Azure Repos provides two types of version control:
      1)Git: distributed version control
      2)Team Foundation Version Control (TFVC): centralized version control
    • Azure Artifacts:
    • By using Azure Artifacts, you can manage and share Maven, NuGet, and npm package feeds from both public and private sources. With a single click, you can integrate package management into your continuous integration/continuous delivery pipelines.

    • Azure Test Plans:
      Quality is a vital aspect of software systems, and manual testing and exploratory testing continue to be an important technique for maximizing this. Every member of the software development team owns quality, including developers, managers, product owners, user experience advocates, and others. Using Azure DevOps and TFS, everyone in the team can drive quality and collaboration throughout the development process. Browser-based test management software provides all the capabilities needed for manual testing, user acceptance testing, exploratory testing, and gathering stakeholder feedback.

    IN THE UPCOMING BLOG, I WILL DESCRIBE OUR USER STORY OF HOW AZURE DEVOPS HELPS US IN PROJECT DEVELOPMENT, AUTOMATING TESTING AND MANAGING WORK ITEMS. STAY TUNED AND ☮