<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Khairun Nahar Nowrin</title>
    <description>The latest articles on DEV Community by Khairun Nahar Nowrin (@khairunnaharnowrin).</description>
    <link>https://dev.to/khairunnaharnowrin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F960890%2Fd22e3992-3f38-4a7a-a35a-2b90b0fd4749.jpeg</url>
      <title>DEV Community: Khairun Nahar Nowrin</title>
      <link>https://dev.to/khairunnaharnowrin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/khairunnaharnowrin"/>
    <language>en</language>
    <item>
      <title>Move the Minimize, Maximize and Close buttons to the left in Ubuntu</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Sun, 12 May 2024 08:17:38 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/move-the-minimize-maximize-and-close-buttons-to-the-left-in-ubuntu-p6k</link>
      <guid>https://dev.to/khairunnaharnowrin/move-the-minimize-maximize-and-close-buttons-to-the-left-in-ubuntu-p6k</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Open a terminal by pressing Ctrl + Alt + T.&lt;/li&gt;
&lt;li&gt;Open a terminal by pressing Ctrl + Alt + T.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gsettings set org.gnome.desktop.wm.preferences button-layout 'close,minimize,maximize:'

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to revert the changes and move the buttons back to the right, you can use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gsettings set org.gnome.desktop.wm.preferences button-layout 'appmenu:minimize,maximize,close'

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Generating a new SSH key and adding it to the ssh-agent in Mac</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Wed, 08 May 2024 10:03:57 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent-4c6b</link>
      <guid>https://dev.to/khairunnaharnowrin/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent-4c6b</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Go to github profile&lt;/li&gt;
&lt;li&gt;Go to Profile settings&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffp3v2rfwqv35wvp1sbnj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffp3v2rfwqv35wvp1sbnj.png" alt="Image description" width="323" height="658"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Then click on SSH and GPG keys&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr4gfbotfpz65ia5v2xor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr4gfbotfpz65ia5v2xor.png" alt="Image description" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open you mac terminal and Paste the text below, replacing the email used in the example with your GitHub email address
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t ed25519 -C "your_email@example.com"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;After Run the command it show &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5pjygyh0eczqfeehp6n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5pjygyh0eczqfeehp6n.png" alt="Image description" width="800" height="49"&gt;&lt;/a&gt;&lt;br&gt;
Put your laptop password&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;After that it generate SHA256&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2z4lmwvxu3ix6z3f1ty.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2z4lmwvxu3ix6z3f1ty.png" alt="Image description" width="554" height="371"&gt;&lt;/a&gt;&lt;br&gt;
7.Start the ssh-agent in the background.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ eval "$(ssh-agent -s)"
&amp;gt; Agent pid 59566
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Run
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;open ~/.ssh/config  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the file doesn't exist, create the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch ~/.ssh/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh97iy2rwpt9tunq1v3u6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh97iy2rwpt9tunq1v3u6.png" alt="Image description" width="525" height="77"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open ~/.ssh/config file, then modify the file to contain the following lines. If your SSH key file has a different name or path than the example code, modify the filename or path to match your current setup.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Text&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzta41kf1v5mxjsldot1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzta41kf1v5mxjsldot1.png" alt="Image description" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-add --apple-use-keychain ~/.ssh/id_ed25519   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it show error like &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdo0g557omfs0bgy1ktg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdo0g557omfs0bgy1ktg.png" alt="Image description" width="505" height="59"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t ed25519 -C Your_github_emailr@gmail.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foq24hkkq63b29to736gn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foq24hkkq63b29to736gn.png" alt="Image description" width="637" height="61"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to your git hub account and click on "New SSH key"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqqvu8v24asurpv1sgud2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqqvu8v24asurpv1sgud2.png" alt="Image description" width="661" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Provide title and key. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo60dsm5z1oytsq5s6hy4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo60dsm5z1oytsq5s6hy4.png" alt="Image description" width="677" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;For "key" open .ssh &amp;gt; id_ed25519.pub &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr9ir3viptc1owivl1wam.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr9ir3viptc1owivl1wam.png" alt="Image description" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now clone a project from your github repository&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone git@github.com:KhairunNaharNowrin/End-to-End-Testing-With-Cypress.git  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Setup the project environment&lt;/li&gt;
&lt;li&gt;Run
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "set up environment"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will show error like "Author identity unknown"&lt;/p&gt;

&lt;p&gt;Run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.email "you@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  git config --global user.name "Your Name"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to set your account's default identity.&lt;br&gt;
Omit --global to set the identity only in this repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe7ncj0sqejaml83680fv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe7ncj0sqejaml83680fv.png" alt="Image description" width="800" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;reference - &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent"&gt;https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=45YCxPnBj-w"&gt;https://www.youtube.com/watch?v=45YCxPnBj-w&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>End-to-End Testing With Cypress</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Tue, 07 May 2024 09:52:23 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/end-to-end-testing-with-cypress-3j3e</link>
      <guid>https://dev.to/khairunnaharnowrin/end-to-end-testing-with-cypress-3j3e</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Initial steps&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download vs code- &lt;a href="https://code.visualstudio.com/download"&gt;https://code.visualstudio.com/download&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Clone repository from github- git clone &lt;a href="mailto:git@github.com"&gt;git@github.com&lt;/a&gt;:KhairunNaharNowrin/End-to-End-Testing-With-Cypress.git&lt;/li&gt;
&lt;li&gt;Now open the project folder in VS Code.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Set the environment&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initialize a New Node.js Project: Open a terminal, navigate to your project directory, and run the following command to initialize a new Node.js project:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvmr68t83t7v4t9cwnmbj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvmr68t83t7v4t9cwnmbj.png" alt="Image description" width="800" height="692"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Cypress: Install Cypress as a development dependency in your project using npm:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install cypress --save-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.Opening Cypress: After the installation is complete, you can open Cypress with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx cypress open

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;After run this command it will open cypress modal
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntzk9hptl41m7zuunt97.png" alt="Image description" width="800" height="449"&gt;
&lt;/li&gt;
&lt;li&gt;After click on &lt;strong&gt;Continue&lt;/strong&gt; button it will open testing type modal. Select &lt;strong&gt;E2E Testing&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkb2wwpcyx35eu9wvc41t.png" alt="Image description" width="800" height="449"&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After select the &lt;strong&gt;E2E testing&lt;/strong&gt; it will oprn Configuration files modal. Click on &lt;strong&gt;"Continue"&lt;/strong&gt; button.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgflnhmmqgr6x4kza6kaz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgflnhmmqgr6x4kza6kaz.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select preferable browser and Start E2E Testing. &lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6a4krbl8bptt1334v8rc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6a4krbl8bptt1334v8rc.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After that select first spec&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdjtz0t2cvxhps9tlh0m1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdjtz0t2cvxhps9tlh0m1.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjdl43agugon3urbu4ko1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjdl43agugon3urbu4ko1.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9dzod1fikgcw7qfdcfpt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9dzod1fikgcw7qfdcfpt.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Opening Cypress: After the installation is complete, you can open Cypress with the following command:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx cypress open

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will open the Cypress Test Runner, where you can write and run your tests.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Project Setup&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Disabling watchForFileChanges: false , in &lt;strong&gt;cypress.confiq.js&lt;/strong&gt; improves performance and control by preventing automatic reloading of application files during test runs.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
  e2e: {
    watchForFileChanges: false,
    setupNodeEvents(on, config) {
      // implement node event listeners here

    },
  },
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;&lt;strong&gt;Page Object Model (POM) pattern:&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;└── cypress
    ├── fixtures
    │   └── (static data files)
    ├── integration
    │   └── (test files)
    ├── plugins
    │   └── (Cypress plugins)
    ├── support
    │   ├── commands.js
    │   ├── index.js
    │   └── (other support files)
    ├── page objects
    │   ├── LoginPage.js
    │   ├── HomePage.js
    │   └── (other page object files)
    ├── utilities
    │   └── (utility functions)
    └── (other Cypress configuration files)


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;fixtures: Contains static data files used by tests.&lt;/li&gt;
&lt;li&gt;integration: Contains test files.&lt;/li&gt;
&lt;li&gt;plugins: Contains Cypress plugins.&lt;/li&gt;
&lt;li&gt;support: Contains helper functions, custom commands, and global configuration.&lt;/li&gt;
&lt;li&gt;page objects: Contains page object classes representing different pages of the application.&lt;/li&gt;
&lt;li&gt;utilities: Contains utility functions shared across tests.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Generating Detailed Reports with Plugins&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Install the Plugin:&lt;/u&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install --save-dev cypress-mochawesome-reporter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Update Cypress Configuration: Update &lt;strong&gt;cypress.config.js&lt;/strong&gt; to include the reporter configuration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { defineConfig } = require('cypress');

module.exports = defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      require('cypress-mochawesome-reporter/plugin')(on);
    },
    reporter: 'cypress-mochawesome-reporter',
    reporterOptions: {
      reportDir: 'cypress/reports',
      overwrite: false,
      html: true,
      json: true,
    },
  },
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;Create a Report After Running Tests:&lt;/u&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx cypress run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;View the Report:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;The report will be saved in the cypress/reports directory.&lt;br&gt;
Open the generated HTML file in a browser to view the detailed report.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Install Java in macbook M1/M2/M3</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Fri, 03 May 2024 14:58:00 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/install-java-in-macbook-m1m2m3-58fd</link>
      <guid>https://dev.to/khairunnaharnowrin/install-java-in-macbook-m1m2m3-58fd</guid>
      <description>&lt;p&gt;Install Homebrew: If you haven't already installed Homebrew, you can do so by opening Terminal and running the following command:&lt;br&gt;
bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;==&amp;gt; Next steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run these two commands in your terminal to add Homebrew to your PATH:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') &amp;gt;&amp;gt; /Users/user_name/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Run brew help to get started&lt;/li&gt;
&lt;li&gt;Further documentation:
&lt;a href="https://docs.brew.sh" rel="noopener noreferrer"&gt;https://docs.brew.sh&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install JDK using Homebrew: Once Homebrew is installed, you can install the JDK for ARM-based Macs by running the following command:&lt;br&gt;
bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install --cask temurin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will install the Temurin JDK, which is compatible with ARM-based Macs.&lt;br&gt;
Verify Installation: After installation, you can verify that Java is installed by running:&lt;br&gt;
bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;java -version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command should display the version of Java installed on your system.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Install Home brew in Mac M1/M2/M3</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Fri, 03 May 2024 13:40:15 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/install-home-brew-in-mac-m1m2m3-mg</link>
      <guid>https://dev.to/khairunnaharnowrin/install-home-brew-in-mac-m1m2m3-mg</guid>
      <description>&lt;p&gt;1st run&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The Homebrew installation script will ask you to enter your Mac user password. This is the password you use to sign into your Mac.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dgfjnk9ccow766jzkrl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dgfjnk9ccow766jzkrl.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that run &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

eval "$(/opt/homebrew/bin/brew shellenv)"



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Run &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ brew doctor



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To check the brew install successfully in your system RUN&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ brew doctor



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fou3f3hddtyqrdv0ncye6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fou3f3hddtyqrdv0ncye6.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>General process for writing unit test cases</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Tue, 13 Jun 2023 05:03:53 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/unit-test-430</link>
      <guid>https://dev.to/khairunnaharnowrin/unit-test-430</guid>
      <description>&lt;p&gt;Writing unit test cases involves creating test cases that verify the behavior and correctness of individual units of code, such as functions or methods. Here's a general process for writing unit test cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Understand the Unit: Before writing test cases, it's important to have a clear understanding of the unit you're testing. Identify the purpose, inputs, expected outputs, and any edge cases or special conditions that need to be considered.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose a Testing Framework: Select a testing framework that suits your programming language and environment. Common choices include JUnit for Java, NUnit for .NET, pytest for Python, and Mocha for JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a Test File: Set up a separate file for your test cases. This file should typically have a naming convention that indicates it's a test file, such as "test_..." or "unit_test_...".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Import Dependencies: If your unit relies on external dependencies or modules, import them into your test file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write Test Functions: Each test case should be written as a separate function within your test file. The function name should reflect the behavior being tested. Consider using descriptive names that clearly indicate the purpose of the test case.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set Up Test Data: Prepare the necessary input data for the unit under test. This may involve creating objects, initializing variables, or mocking external resources.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Invoke the Unit: Call the unit being tested with the provided test data or inputs. Pass in any necessary parameters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compare the Result: Verify that the output or behavior of the unit matches the expected result. Use assertions or comparison methods provided by your testing framework to check for equality, exceptions, or other specific conditions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Handle Exceptions: If the unit is expected to raise an exception under certain conditions, use try-catch blocks or assertion methods to ensure the correct exception is thrown.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Repeat for Multiple Scenarios: Create additional test functions to cover different scenarios, edge cases, or boundary conditions. Test both valid and invalid inputs to ensure the unit handles them correctly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the Tests: Execute the test suite using your chosen testing framework. The framework will provide feedback on the success or failure of each test case.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Analyze the Results: Review the test results and identify any failing test cases. Debug and fix any issues in the code being tested until all test cases pass successfully.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Maintain and Update: As your code evolves, update your test cases accordingly to ensure they remain relevant and accurate. Regularly run the test suite to catch regressions or unintended changes in behavior.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember, unit tests should be focused, independent, and isolated from other units of code. Each test should cover a specific aspect or behavior of the unit, making it easier to locate and fix issues when they arise.&lt;/p&gt;

&lt;p&gt;Let's say we have a simple class called Calculator with a method add that adds two numbers together:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;java&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Calculator {
    public int add(int a, int b) {
        return a + b;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To test this class, we can create a test class named CalculatorTest and write the following test case:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class CalculatorTest {

    @Test
    public void testAdd() {
        Calculator calculator = new Calculator();

        // Test case 1: Add two positive numbers
        int result = calculator.add(5, 3);
        Assertions.assertEquals(8, result);

        // Test case 2: Add a positive and a negative number
        result = calculator.add(7, -2);
        Assertions.assertEquals(5, result);

        // Test case 3: Add zero to a number
        result = calculator.add(10, 0);
        Assertions.assertEquals(10, result);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we have a single test method named testAdd annotated with &lt;a class="mentioned-user" href="https://dev.to/test"&gt;@test&lt;/a&gt;. Within this method, we create an instance of the Calculator class and call its add method with different inputs. We then use the Assertions.assertEquals method to verify that the actual result matches the expected result for each test case.&lt;/p&gt;

&lt;p&gt;To run the test case, you can use your IDE's built-in test runner or use a build tool like Maven or Gradle. When using Maven, you can execute the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mvn test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JUnit will automatically discover and execute the test methods in your test class. The test results will be displayed in the console, indicating whether each test case passed or failed.&lt;/p&gt;

&lt;p&gt;You can add more test methods to cover additional scenarios or edge cases. It's also possible to use other assertion methods provided by JUnit, such as assertTrue, assertFalse, or assertThrows, depending on the nature of the expected behavior you want to test.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Cucumber automation code structure</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Thu, 23 Mar 2023 05:27:08 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/cucumber-automation-code-structure-2ip3</link>
      <guid>https://dev.to/khairunnaharnowrin/cucumber-automation-code-structure-2ip3</guid>
      <description>&lt;p&gt;The structure of a cucumber automation code usually follows the following steps:&lt;/p&gt;

&lt;p&gt;Feature file: This file contains the description of the feature to be tested. It should be written in the Gherkin language which is a business-readable, domain-specific language that describes scenarios using a set of predefined keywords like Given, When, Then, And, and But.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Feature: Login
  As a user
  I want to log in to the system
  So that I can access my account

  Scenario: Successful login
    Given I am on the login page
    When I enter my valid credentials
    And I click the login button
    Then I should be logged in successfully
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step Definitions: These are the implementation of the steps defined in the feature file. They are written in programming language, and their main purpose is to interact with the system under test, and perform actions or validations. Each step definition should correspond to a step in the feature file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import io.cucumber.java.en.*;

public class LoginSteps {

    @Given("I am on the login page")
    public void navigateToLoginPage() {
        // code to navigate to login page
    }

    @When("I enter my valid credentials")
    public void enterCredentials() {
        // code to enter valid credentials
    }

    @When("I click the login button")
    public void clickLoginButton() {
        // code to click the login button
    }

    @Then("I should be logged in successfully")
    public void verifySuccessfulLogin() {
        // code to verify successful login
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hooks: Hooks are code snippets that execute before or after each scenario or feature. They can be used for setup and teardown tasks such as launching the browser, closing the browser, or creating test data. Hooks can be global or specific to a feature or scenario.&lt;/p&gt;

&lt;p&gt;Test Runner: A test runner is a program that runs the feature files and executes the step definitions. There are different test runners available for Cucumber, including JUnit, TestNG, and Cucumber-JVM. The test runner usually handles the configuration, setup, and execution of the tests.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(features = "src/test/resources/myFeature.feature",
                 glue = {"com.example.stepdefinitions"})
public class TestRunner {
    // empty
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Supporting files: These are files that contain additional information or configuration for the tests, such as test data, configuration files, or utility classes. They can be organized in folders for better structure and maintainability.&lt;/p&gt;

&lt;p&gt;Here's an example of how a typical Cucumber project structure could look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- src
  - test
    - java
      - com
        - example
          - features
            - feature_file.feature
          - step_definitions
            - step_definition.java
          - runners
            - TestRunner.java
          - support
            - hooks.java
            - utils.java
          - resources
            - test_data.csv
    - resources
      - chromedriver.exe
  - main
    - java
    - resources

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Appium automation code structure</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Sun, 19 Mar 2023 10:34:43 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/appium-automation-code-structure-fk9</link>
      <guid>https://dev.to/khairunnaharnowrin/appium-automation-code-structure-fk9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Desired Capabilities&lt;/strong&gt;: Desired capabilities are a set of key-value pairs that specify the characteristics of the device or emulator to be used for testing. This includes details such as device name, platform version, app package name, and app activity name. These capabilities are used to initialize the driver object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    @BeforeTest
    public void setup() throws Exception {
        DesiredCapabilities caps = new DesiredCapabilities();
        caps.setCapability("deviceName", "Android Emulator");
        caps.setCapability("platformVersion", "11");
        caps.setCapability("appPackage", "com.example.myapp");
        caps.setCapability("appActivity", "com.example.myapp.MainActivity");
        caps.setCapability("automationName", "UiAutomator2");
        caps.setCapability("noReset", true);

        driver = new AndroidDriver&amp;lt;AndroidElement&amp;gt;(new URL("http://127.0.0.1:4723/wd/hub"), caps);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Page Objects:&lt;/strong&gt; Page objects are classes that encapsulate the behavior and properties of the user interface elements of an app. They provide a layer of abstraction between the test code and the app's user interface. Each screen or page of the app can have a corresponding page object class.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test Code:&lt;/strong&gt; The test code is written to interact with the user interface elements of the app through the page objects. It typically includes the steps that the user takes to navigate through the app, interact with the elements, and perform validations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    @Test
    public void loginTest() {
        LoginPage loginPage = new LoginPage(driver);
        loginPage.enterUsername("myusername");
        loginPage.enterPassword("mypassword");
        loginPage.clickLoginButton();

        HomePage homePage = new HomePage(driver);
        Assert.assertTrue(homePage.isUserLoggedIn());
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Test Runner:&lt;/strong&gt; The test runner is a program that runs the test code and communicates with the Appium server to automate the app. There are different test runners available for Appium, including TestNG, JUnit, and Appium Studio. The test runner usually handles the configuration, setup, and execution of the tests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supporting files:&lt;/strong&gt; These are files that contain additional information or configuration for the tests, such as test data, configuration files, or utility classes. They can be organized in folders for better structure and maintainability.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- src
  - main
    - java
      - com
        - example
          - pages
            - LoginPage.java
            - HomePage.java
          - tests
            - LoginTest.java
          - utils
            - AppiumUtils.java
    - resources
      - app
        - MyApp.apk
  - test
    - java
      - com
        - example
          - runners
            - TestRunner.java

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Connect iOS device Connected to Appium Studio</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Thu, 09 Feb 2023 06:38:26 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/connect-ios-device-connected-to-appoium-studio-5enl</link>
      <guid>https://dev.to/khairunnaharnowrin/connect-ios-device-connected-to-appoium-studio-5enl</guid>
      <description>&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;br&gt;
Install ios-deploy via Homebrew by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install ios-deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;List ids and names of connected devices&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ios-deploy -c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Link - &lt;a href="https://www.npmjs.com/package/ios-deploy" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/ios-deploy&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>How To Setup ZSH on Mac Terminal</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Sun, 05 Feb 2023 07:21:48 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/how-to-setup-zsh-on-mac-terminal-37dj</link>
      <guid>https://dev.to/khairunnaharnowrin/how-to-setup-zsh-on-mac-terminal-37dj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Install Homebrew&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open up a terminal window and install homebrew with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Add Homebrew To Path&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After installing, add it to the path (replace "[username]" with your actual username):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' &amp;gt;&amp;gt; /Users/[username]/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install iTerm2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To install, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install --cask iterm2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Switch to iTerm2 for the remainder of this walkthrough.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Git&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you don't have it installed, install git as well:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install Oh My Zsh&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run this to install Oh My Zsh:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install PowerLevel10K Theme for Oh My Zsh&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run this to install PowerLevel10K:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that it's installed, open the zshrc run this command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nano ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;file with your preferred editor and change the value of "ZSH_THEME" as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ZSH_THEME="powerlevel10k/powerlevel10k"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To reflect this change on your terminal, restart it or run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install Meslo Nerd Font&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Install the font by pressing "y" and then quit iTerm2.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update VSCode Terminal Font (Optional)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The settings.json file in Visual Studio Code can be found in the following location:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;macOS: $HOME/Library/Application Support/Code/User/settings.json&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can also access the settings.json file directly in Visual Studio Code by going to File &amp;gt; Preferences &amp;gt; Settings, and then clicking on the {} icon in the top right corner to open the settings.json file.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Open settings.json and add this line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"terminal.integrated.fontFamily": "MesloLGS NF"
Configure PowerLevel10K
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart iTerm2. You should now be seeing the PowerLevel10K configuration process. If you don't, run the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p10k configure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Follow the instructions for the PowerLevel10K configuration to make your terminal look as desired.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Increase Terminal Font Size&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open iTerm2 preferences&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to Profiles &amp;gt; Text&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I increase my font size to about 20px&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Change iTerm2 Colors to My Custom Theme&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open iTerm2&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download my color profile by running the following command (will be added to Downloads folder):&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://raw.githubusercontent.com/josean-dev/dev-environment-files/main/coolnight.itermcolors --output ~/Downloads/coolnight.itermcolors
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open iTerm2 preferences&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to Profiles &amp;gt; Colors&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Import the downloaded color profile (coolnight)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the color profile (coolnight)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can find other themes here: Iterm2 Color Schemes&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install ZSH Plugins&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Install zsh-autosuggestions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Install zsh-syntax-highlighting:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the "~/.zshrc" file in your desired editor and modify the plugins line to what you see below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plugins=(git zsh-autosuggestions zsh-syntax-highlighting web-search)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Load these new plugins by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;You're Done!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Youtube video reference - &lt;a href="https://www.youtube.com/watch?v=CF1tMjvHDRA&amp;amp;t=284s" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=CF1tMjvHDRA&amp;amp;t=284s&lt;/a&gt;&lt;/p&gt;

</description>
      <category>welcome</category>
      <category>codenewbie</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Java RestAssure Maven Dockerfile</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Mon, 23 Jan 2023 11:36:19 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/java-restassure-maven-dockerfile-2peb</link>
      <guid>https://dev.to/khairunnaharnowrin/java-restassure-maven-dockerfile-2peb</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Dockerfile&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM maven:3.6.3-openjdk-11

# Set the working directory to the project root
WORKDIR /app

# Copy the pom.xml file to the image
COPY pom.xml .

# Build the project dependencies
RUN mvn dependency:go-offline

# Copy the rest of the project source code
COPY . /JAVA_AUTOMATION

# Build the project
RUN mvn package

# Set the default command to run when the container starts
CMD ["java", "-jar", "target/JAVA_AUTOMATION.jar"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;u&gt;Docker Image build, Container run and Run Testcase&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Fetch the latest of running container
docker ps -l

# The docker rm command is used to remove the container. The $(...) syntax is used to execute the docker ps -l -q command and pass the output (which is the container ID of the latest container) as an argument to the docker rm command.
#This approach will delete the latest running container
docker rm $(docker ps -l -q)

#To remove a Docker image forcefully
docker rmi -f hn-automation
# Build the Docker image
docker build -t hn-automation .

# Run a new container based on the image, and Run test case command in container
docker run -it hn-automation  mvn clean test -DsuiteXmlFile=testng.xml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>discuss</category>
    </item>
    <item>
      <title>API Automation using JAVA, Dockerize and Write data from google sheets using Java for Generate API Test-case automation report</title>
      <dc:creator>Khairun Nahar Nowrin</dc:creator>
      <pubDate>Tue, 10 Jan 2023 06:13:37 +0000</pubDate>
      <link>https://dev.to/khairunnaharnowrin/api-automation-using-java-dockerize-and-write-data-from-google-sheets-using-java-for-generate-api-test-case-automation-report-3o8d</link>
      <guid>https://dev.to/khairunnaharnowrin/api-automation-using-java-dockerize-and-write-data-from-google-sheets-using-java-for-generate-api-test-case-automation-report-3o8d</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Environment Setup for JAVA API Project &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To install the Java Development Kit (JDK) on a Mac, you can follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to the Oracle website and download the latest version of the JDK for Mac.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the downloaded .dmg file and run the installer package.&lt;br&gt;
&lt;a href="https://www.oracle.com/java/technologies/downloads/#jdk19-mac"&gt;https://www.oracle.com/java/technologies/downloads/#jdk19-mac&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow the prompts to install the JDK on your computer.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgojy4r4o7ssu1zmyclyx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgojy4r4o7ssu1zmyclyx.png" alt="Image description" width="800" height="239"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, you can also install &lt;strong&gt;JDK&lt;/strong&gt; using &lt;strong&gt;Homebrew&lt;/strong&gt; package manager by running the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; brew cask install java
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the installation is complete, you can verify that the JDK is installed by opening a terminal window and running the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;java --version 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This should display the version of the JDK that is currently installed on your system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;java --version                                              ✔  
javac 17.0.5
Which java  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsskct5jwb5wn3facdn9z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsskct5jwb5wn3facdn9z.png" alt="Image description" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;After that set the Java path in .zshrc file, To follow these steps:&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the .zshrc file by running the command This will open
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nano ~/.zshrc 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the nano text editor with your .zshrc file.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add the following lines to the file, replacing the path with the path to your JDK installation. To find Java path run
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Which java 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;export JAVA_HOME=path-to-jdk&lt;br&gt;
export PATH=$JAVA_HOME/bin:$PATH&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Save and close the .zshrc file by pressing "CTRL+X", then "Y", and then "Enter".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reload the .zshrc file by running the command&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source .zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Verify the changes by running the command
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo $JAVA_HOME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and "echo $PATH" it should display the path you have set in the above step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkl41rp63dyqjsyziqbu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkl41rp63dyqjsyziqbu7.png" alt="Image description" width="800" height="57"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Create API Project &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To create a new Gradle project in IntelliJ IDEA, you can follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open IntelliJ IDEA and navigate to the "Welcome to IntelliJ IDEA" window.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the "Create New Project" button or choose "File" &amp;gt; "New" &amp;gt; "Project" from the main menu.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the "New Project" window, select the "Gradle" option from the list of available project types.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the "Java" or "Kotlin" option as the project's SDK. I select Java.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the "Project name" field, enter a name for your project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the "Project location" field, choose a location on your computer where you want to save your project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the "Next" button to proceed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the "Project Structure" window, you can configure the settings for your project such as the project SDK, language level, and project format.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the "Finish" button to create your new Gradle project.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyreg7aly0r5pt2siyccx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyreg7aly0r5pt2siyccx.png" alt="Image description" width="800" height="631"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7yk7dsz7eky1eco00r8l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7yk7dsz7eky1eco00r8l.png" alt="Image description" width="800" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fohgbnmwg6p9qn4zd57oo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fohgbnmwg6p9qn4zd57oo.png" alt="Image description" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Setup Project &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;API automation using Java involves writing code to test the functionality and performance of Application Programming Interfaces (APIs). There are several libraries and frameworks available in Java for API automation, including:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Rest-Assured: A Java library specifically designed for testing RESTful web services. It provides a simple and clean syntax for sending HTTP requests and asserting the responses.&lt;/p&gt;

&lt;p&gt;JUnit: A popular unit testing framework for Java, JUnit can be used to write automated tests for APIs.&lt;/p&gt;

&lt;p&gt;TestNG: Another testing framework for Java, TestNG is similar to JUnit but provides additional features such as support for data-driven testing and parallel test execution.&lt;/p&gt;

&lt;p&gt;Apache HttpClient: A library for sending and receiving HTTP requests and responses. It can be used to send requests to an API and assert the response.&lt;/p&gt;

&lt;p&gt;WireMock: A library for creating HTTP-based API mocks. It can be used to simulate API responses for testing purposes.&lt;/p&gt;

&lt;p&gt;JSON: The JSON object library, such as Gson, provides a way to work with JSON data in Java by providing a set of classes and methods for parsing and generating JSON. Using a JSON library allows you to easily convert between JSON data and Java objects, making it more convenient to work with JSON data in a Java application.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dependencies {
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'

    //RestAssured
    testImplementation 'io.rest-assured:rest-assured:4.3.1'

    //TestNG Library
    testImplementation 'org.testng:testng:7.3.0'

    //HttpClient
    implementation 'org.apache.httpcomponents:httpclient:4.5.13'

    //WireMock
    testImplementation 'com.github.tomakehurst:wiremock-jre8:2.27.2'
    testImplementation 'com.github.tomakehurst:wiremock-standalone:2.27.2'

    //JsonObject
    implementation 'com.google.code.gson:gson:2.8.6'
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;u&gt;Code-base &lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Repository link - &lt;a href="https://github.com/DevSK1207/API_Automation_and_App_Integratio_Testing_Using_Java"&gt;https://github.com/DevSK1207/API_Automation_and_App_Integratio_Testing_Using_Java&lt;/a&gt; &lt;br&gt;
&lt;strong&gt;&lt;u&gt;Run Test-case &lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
I'm facing this issue while im run test case from Intellij.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhtm82f81f19pejz3s4oy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhtm82f81f19pejz3s4oy.png" alt="Image description" width="800" height="171"&gt;&lt;/a&gt;&lt;br&gt;
To resolve this issue -&amp;gt; Intellij &amp;gt; settings &amp;gt; Build, execution &amp;gt; &lt;br&gt;
To run a JUnit test case in Java, you can use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./gradlew test --tests &amp;lt;TestClassName&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Can also specify the package name and class name to run the test case&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./gradlew test --tests packageName.TestClassName
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Can also run all the test cases for a project by using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./gradlew test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;u&gt;Dockerize the Project &lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM gradle:5.0-jdk11-alpine AS build


# Set the working directory to the project root
WORKDIR /app

# Copy the gradle
COPY --chown=gradle:gradle . /home/gradle/src

#Run gradle
RUN gradle build --no-daemon


FROM openjdk:11-jre-slim

EXPOSE 8080

# Copy the rest of the project source code
COPY . /JavaRestAssure

# Set the default command to run when the container starts

CMD ["java", "-jar", "build/libs/JavaRestAssure.jar"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For build docker Image&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker build -t java-automation .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run Docker container,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -it java-automation /bin/bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;u&gt;Google Spreadsheet Setup for g-Sheet &lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;u&gt;Read and Write g-Sheet function&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;u&gt;Write data from google sheets&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;u&gt;Generate API Test-case automation report&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
