<?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: VRaptor Code</title>
    <description>The latest articles on DEV Community by VRaptor Code (@douglasmartins7).</description>
    <link>https://dev.to/douglasmartins7</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%2F237502%2F9e749993-2812-439d-a60c-8e74da03a04d.png</url>
      <title>DEV Community: VRaptor Code</title>
      <link>https://dev.to/douglasmartins7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/douglasmartins7"/>
    <language>en</language>
    <item>
      <title>CYPRESS X ROBOT FRAMEWORK</title>
      <dc:creator>VRaptor Code</dc:creator>
      <pubDate>Tue, 11 Feb 2025 15:05:47 +0000</pubDate>
      <link>https://dev.to/douglasmartins7/cypress-x-robot-framework-kj7</link>
      <guid>https://dev.to/douglasmartins7/cypress-x-robot-framework-kj7</guid>
      <description>&lt;p&gt;Cypress and Robot Framework are two popular tools for test automation, and it's no surprise that they are among the most requested in job openings. But which one is the best for you to invest your study time in? Find out in this post.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Approach and Architecture&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cypress&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;It is a test automation tool focused exclusively on testing modern web applications. It operates directly in the browser, which allows for more precise control over the behavior of the application during tests.&lt;/li&gt;
&lt;li&gt;Cypress's architecture is based on Node.js and runs in the same event loop as the browser (which is awesome), enabling synchronous and more predictable test execution.&lt;/li&gt;
&lt;li&gt;It is known for its ability to provide end-to-end tests with a strong focus on realistically simulating user interactions.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Robot&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;It is a generic automation framework that supports not only web application testing but also API testing, desktop automation, mobile apps, web, and more.&lt;/li&gt;
&lt;li&gt;It is based on a keyword-driven architecture, where tests are written using a simple and readable syntax that can be extended with custom or existing libraries.&lt;/li&gt;
&lt;li&gt;It is highly modular and can be integrated with various tools and libraries, such as Selenium for web testing (I'm not sure if this is very good), Requests for API testing, and many others.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Language and Syntax&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cypress&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;It uses JavaScript (or TypeScript) to write tests. This means that tests are written in a full programming language, which provides great flexibility and power to handle complex logic.&lt;/li&gt;
&lt;li&gt;Its syntax is quite expressive and allows for command chaining, making it easier to write concise and readable tests.&lt;/li&gt;
&lt;li&gt;Example code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cy.visit('https://some_login_and_password_generation_site_for_test.com')
cy.get('input[name="username"]').type('Cypress is awesome')
cy.get('input[name="password"]').type('super_secret_password')
cy.get('button[type="submit"]').click()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Robot&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;It uses a text-based syntax that is more declarative and less verbose than traditional programming. Tests are written in plain text files or in tabular format.&lt;/li&gt;
&lt;li&gt;The keyword structure allows even non-programmers to write tests, as long as they understand the application's domain.&lt;/li&gt;
&lt;li&gt;Example code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*** Settings ***
Library    SeleniumLibrary

*** Test Cases ***
Login Test
    Open Browser    https://some_login_and_password_site_again.com    chrome
    Input Text      name=username          robot_is_awesome_too
    Input Text      name=password          password_that_will_never_be_guessed_1234567
    Click Button    type=submit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Integration and Extensibility&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cypress&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;It is highly integrated with the JavaScript ecosystem, making it easy to integrate with CI/CD tools, front-end frameworks (like React, Angular, Vue), and assertion libraries (like Chai).&lt;/li&gt;
&lt;li&gt;It also has a rich set of plugins that can be used to extend its functionality, such as plugins for report generation, integration with monitoring tools, etc.&lt;/li&gt;
&lt;li&gt;It has external libraries for integration with databases like PostgreSQL.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Robot&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;It is highly extensible and can be integrated with a wide variety of libraries and tools. It supports integration with Selenium for web testing, Requests for API testing, DatabaseLibrary for database testing, and many others.&lt;/li&gt;
&lt;li&gt;Its modular structure allows users to create their own keyword libraries, making it extremely flexible for different testing scenarios.&lt;/li&gt;
&lt;li&gt;In addition, it has native support for integration with CI/CD tools and detailed report generation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Performance and Speed&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cypress&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;When it comes to web testing, it’s hard to beat Cypress. It is known for its speed and efficiency in testing web applications. Since it operates directly in the browser, it can execute tests faster and with less overhead compared to tools that rely on external drivers (like Selenium). I know this has been mentioned in another post on my LinkedIn, but hey, it's true XD.&lt;/li&gt;
&lt;li&gt;However, it may be less efficient in scenarios where you need to test multiple browsers or in distributed environments, as it is primarily designed to run in Chrome. But it integrates excellently with Firefox, and there’s an experimental project for running Cypress in Safari. You didn't know that? Check it out here: &lt;a href="https://docs.cypress.io/app/references/launching-browsers#WebKit-Experimental" rel="noopener noreferrer"&gt;https://docs.cypress.io/app/references/launching-browsers#WebKit-Experimental&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Robot&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;It may be slower compared to Cypress, especially when used with Selenium, due to the additional overhead of the browser driver and communication between the framework and the browser.&lt;/li&gt;
&lt;li&gt;However, it can be scaled for parallel and distributed execution, which can help mitigate performance issues in large test suites.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Reporting and Debugging&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cypress&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;It offers an exceptional debugging experience, with integrated browser tools that allow inspecting the application state at any point in the test. It also automatically captures screenshots and video recordings in case of failures.&lt;/li&gt;
&lt;li&gt;The reports generated are detailed and can be integrated with CI/CD tools for continuous monitoring.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Robot&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;It generates detailed reports and logs by default, which are highly customizable. These reports are useful for post-execution analysis and sharing results with stakeholders.&lt;/li&gt;
&lt;li&gt;Debugging can be more challenging, especially for less experienced users, due to the declarative nature of the syntax and the reliance on external libraries.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use Cases and Suitability&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Cypress&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;It is ideal for teams developing modern web applications and already familiar with the JavaScript ecosystem. It is particularly well-suited for end-to-end testing and scenarios where simulating user interactions is critical.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Robot&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;It is more suitable for teams that need a generic and flexible automation solution capable of handling a variety of test types (web, API, database, etc.). It is particularly useful in environments where collaboration between technical and non-technical team members is important.&lt;/li&gt;
&lt;li&gt;It is less focused on end-to-end testing of modern web applications and may not offer the same smooth development experience as Cypress
.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fm8gyppjmbgjshveeccxx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fm8gyppjmbgjshveeccxx.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What do you think? Which one is the best in your opinion?&lt;/p&gt;

&lt;p&gt;embed Leave your comment below if you work with either of them or if you want to learn.&lt;br&gt;
 👇&lt;/p&gt;

</description>
    </item>
    <item>
      <title>💻 5 Tips to Improve Performance Testing with K6 🚀</title>
      <dc:creator>VRaptor Code</dc:creator>
      <pubDate>Mon, 27 Jan 2025 15:11:25 +0000</pubDate>
      <link>https://dev.to/douglasmartins7/5-tips-to-improve-performance-testing-with-k6-4pon</link>
      <guid>https://dev.to/douglasmartins7/5-tips-to-improve-performance-testing-with-k6-4pon</guid>
      <description>&lt;p&gt;Application performance is crucial to ensuring a good user experience, and load testing plays a key role in this process. K6 is a powerful open-source tool for performance testing, and here are 5 tips to get the most out of it:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plan Your Test Scenario Before Writing the Script&lt;/strong&gt;&lt;br&gt;
Before diving into coding, understand the main goals of the test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What is the expected behavior of the application under load?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How many simultaneous users do you want to simulate? (If unsure, ask stakeholders, POs, agilists, etc.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Which endpoints need to be tested?&lt;br&gt;
A solid plan saves time and avoids rework.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use Modular and Reusable Scripts&lt;/strong&gt;&lt;br&gt;
Organize your K6 scripts so they are easy to maintain and reuse. Use functions to group repetitive logic and store common configurations in separate files.&lt;/p&gt;

&lt;p&gt;💡 Tip: Combine scripts with dynamic input data to simulate realistic scenarios.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitor Strategic Metrics&lt;/strong&gt;&lt;br&gt;
In K6, metrics like response time, requests per second, and error rate are fundamental. Add checks and thresholds to ensure results are measurable and meet expectations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;check(res, {
  'response time &amp;lt; 200ms': (r) =&amp;gt; r.timings.duration &amp;lt; 200,
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Integrate K6 into CI/CD Pipelines&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Automate load testing by integrating K6 into your CI/CD pipeline. This helps identify performance bottlenecks before reaching production. Tools like GitHub Actions, Jenkins, or GitLab are great options for automation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Analyze Results in Depth&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After each test run, analyze the metrics and logs to identify issues. Use tools like Grafana, New Relic, Dynatrace, or others for real-time visualization and detailed reporting.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Testing your application's performance is an investment that can prevent future problems and increase customer satisfaction. With these tips, you can use K6 to create efficient tests and ensure a robust application.&lt;/p&gt;

&lt;p&gt;For a ready-made template with pre-built scenarios, download the repository: &lt;a href="https://github.com/DougSantos3/template_performance_testing_k6" rel="noopener noreferrer"&gt;https://github.com/DougSantos3/template_performance_testing_k6&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you, do you already use K6 in your projects? Share your experiences below! 👇&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How does Cypress work?</title>
      <dc:creator>VRaptor Code</dc:creator>
      <pubDate>Wed, 22 Jan 2025 19:02:49 +0000</pubDate>
      <link>https://dev.to/douglasmartins7/understanding-android-studio-menus-for-cleaning-and-rebuilding-projects-1c6h</link>
      <guid>https://dev.to/douglasmartins7/understanding-android-studio-menus-for-cleaning-and-rebuilding-projects-1c6h</guid>
      <description>&lt;p&gt;It is a web and API end-to-end (E2E) testing automation tool that runs directly in the browser, which sets it apart from other testing tools. The way it works is key to its efficiency and popularity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Runs within the same browser environment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you run a test, it integrates directly into the browser where your application is loaded.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This means it has full access to:&lt;/li&gt;
&lt;li&gt;   DOM (HTML structure)&lt;/li&gt;
&lt;li&gt;   Network (HTTP/HTTPS requests)&lt;/li&gt;
&lt;li&gt;   Local storage and cookies&lt;/li&gt;
&lt;li&gt;   Browser events&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 Think of Cypress as a co-pilot sitting inside the car (browser) with access to everything that's going on. It can see the dashboard (DOM), hear the commands (events), and even adjust the controls (like modifying cookies).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Executes tests in real-time&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It doesn't use WebDriver (unlike tools like Selenium). It runs directly in the same event loop as the browser.&lt;/li&gt;
&lt;li&gt;   This allows tests to be fast, reliable, and synchronized &lt;/li&gt;
&lt;li&gt; because:&lt;/li&gt;
&lt;li&gt;   There's no delay in communication between the test and the browser.&lt;/li&gt;
&lt;li&gt;   It knows exactly when elements are available or when requests have finished, without needing "manual waits."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 If you ask Selenium to check if a button is visible, it has to ask the browser and wait for a response. Cypress "looks with its own eyes" inside the browser and knows immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instant feedback&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;    When a test fails, Cypress shows exactly:&lt;/li&gt;
&lt;li&gt;    What went wrong (e.g., element not found)&lt;/li&gt;
&lt;li&gt;    The state of the application at the time of the error (e.g., DOM, console, network)&lt;/li&gt;
&lt;li&gt;    You can even replay the steps manually in the visual interface to understand the problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Powerful and easy-to-use features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; It makes writing tests much easier with:&lt;/li&gt;
&lt;li&gt;     Chained commands (cy.get().click())&lt;/li&gt;
&lt;li&gt;     Automatic waits (no need for sleep, it waits for elements to appear or requests to finish)&lt;/li&gt;
&lt;li&gt;     Event simulation like clicks, typing, and scrolling&lt;/li&gt;
&lt;li&gt;     API interception (mocking or validating requests)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why is it so good?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Easy to set up&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Just install with a single command (npm install cypress) and start writing tests, no complex configurations needed.&lt;/li&gt;
&lt;li&gt;  It runs directly in the browser, so there's no need to install additional drivers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Fast and reliable&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Since it runs in the same environment as the application, it avoids synchronization issues. Sometimes with Selenium, the test might fail not because it's poorly written or the application crashed, but because Selenium couldn't connect — this doesn't happen with Cypress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Integrated features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UI and API testing in the same place&lt;/li&gt;
&lt;li&gt;   Automatic screenshot and video capture of tests&lt;/li&gt;
&lt;li&gt;   Integration with Allure reporting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What about you, have you already used Cypress in your projects or would you like to learn more about it? Comment here! 👇&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding the Android Studio menus for cleaning and rebuilding a project</title>
      <dc:creator>VRaptor Code</dc:creator>
      <pubDate>Fri, 03 Jan 2025 21:49:42 +0000</pubDate>
      <link>https://dev.to/douglasmartins7/entendendo-os-menus-do-android-studio-sobre-limpeza-e-reconstrucao-de-projeto-2nm3</link>
      <guid>https://dev.to/douglasmartins7/entendendo-os-menus-do-android-studio-sobre-limpeza-e-reconstrucao-de-projeto-2nm3</guid>
      <description>&lt;p&gt;Do you know when you're testing an Android app and it crashes, or when you want to build it, but various errors show up in Logcat (Android's log terminal), and you decide to clean up through Android Studio, but have no idea what's really going on? Well, in this article, we will explain in a very straightforward and quick way each type of clean-up and which one is best to use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ftwieg6ybxm22vd1b1h3h.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ftwieg6ybxm22vd1b1h3h.gif" alt="Image description" width="370" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File → Invalidate Caches / Restart&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Purpose&lt;/strong&gt; Clears the Android Studio cache and restarts the IDE. This resolves indexing issues, phantom errors, or broken configurations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What is indexing in the context of Android Studio?&lt;br&gt;
In Android Studio, indexing is the process by which the IDE scans, analyzes, and organizes all the project files (source code, libraries, dependencies, resources, etc.) into an internal index. This index makes various essential Android Studio functionalities faster and more efficient, such as: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Autocomplete&lt;/li&gt;
&lt;li&gt;  Refactoring (renaming variables, classes, methods)&lt;/li&gt;
&lt;li&gt;  Quick navigation between files and symbols&lt;/li&gt;
&lt;li&gt;  Real-time error validation&lt;/li&gt;
&lt;li&gt;  Efficient project-wide search&lt;/li&gt;
&lt;li&gt;  Going back to Invalidate Caches: Clears the temporary files and caches of Android Studio.&lt;/li&gt;
&lt;li&gt;  Forces the IDE to reindex the project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Resolves issues related to autocomplete or configurations that aren't being applied correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Autocomplete is not working.&lt;/li&gt;
&lt;li&gt;The project has errors that don't appear in the source code.&lt;/li&gt;
&lt;li&gt;After updating plugins or libraries."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Build → Clean Project&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Purpose:&lt;/strong&gt; Removes all files generated during the build process, such as compiled classes, temporary libraries, and previous APKs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deletes files in the project's build/ folder.&lt;/li&gt;
&lt;li&gt;Ensures there are no remnants from old builds.&lt;/li&gt;
&lt;li&gt;When to use:&lt;/li&gt;
&lt;li&gt;After significant changes in the code.&lt;/li&gt;
&lt;li&gt;When there are build issues that might be related to old remnants.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Maven equivalent: mvn clean&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build → Rebuild Project&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Purpose&lt;/strong&gt;: Performs a Clean followed by a full rebuild of the project.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Removes all files in the build/ folder.&lt;br&gt;
Recompiles the entire project from scratch.&lt;br&gt;
When to use:&lt;/p&gt;

&lt;p&gt;After significant changes in the code or dependencies.&lt;br&gt;
When the project is not compiling correctly.&lt;br&gt;
Maven equivalent: mvn clean install&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code → Code Cleanup in Android Studio.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is it?
The option Code → Code Cleanup is used to automatically format and optimize source code in Android Studio.
It applies predefined coding style rules, removes unnecessary imports, and makes other improvements to the code, making it cleaner and more standardized.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What does Code Cleanup do?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Removal of Unused Imports:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Deletes imports that are not being used in the file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Formatting:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Adjusts indentation, spacing, and line breaks according to the style set in Android Studio.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Optimization:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Replaces redundant instructions with more efficient alternatives.&lt;/li&gt;
&lt;li&gt;Simplifies complex expressions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Warning Fixes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatically resolves small warnings identified by the Android Studio Lint.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Style Standardization:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Applies rules defined in the style configuration file (Code Style Settings).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to use Code Cleanup?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to Code → Code Cleanup.&lt;/li&gt;
&lt;li&gt;Select the files you want to clean (it can be a file, a directory, or the entire project).&lt;/li&gt;
&lt;li&gt;Choose a cleanup profile (default or custom).&lt;/li&gt;
&lt;li&gt;Click Run.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before Code Cleanup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fun greet() { println("Hello, World!") }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code is more organized, with proper indentation and spacing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use Code Cleanup?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Before submitting code for review (code review).&lt;/li&gt;
&lt;li&gt;After finishing a new feature.&lt;/li&gt;
&lt;li&gt;To maintain consistency in coding style.&lt;/li&gt;
&lt;li&gt;Now you know how to keep your code clean and beautiful in Android Studio!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Extras (Commands with Mvn)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;mvn clean package&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Purpose:&lt;/strong&gt; Removes old compiled files (clean) and packages the project into a file (package, usually a JAR or APK in the case of Android).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When to use:&lt;/strong&gt; After modifying the source code to ensure all changes are correctly applied to the final artifact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;mvn clean package Build → Clean Project:&lt;/strong&gt; Removes old files and compiles.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;mvn clean install&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Purpose:&lt;/strong&gt; Removes old files (clean), recompiles the project, and installs the resulting artifact (JAR or APK) into the local Maven repository. This ensures that dependencies and libraries are correctly available in the classpath.
When to use: When adding or updating dependencies in the pom.xml file (or build.gradle in Android Studio).
mvn clean install
Build → Rebuild Project: Removes, compiles, and installs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File → Invalidate Caches: Clears cache and restarts Android Studio.&lt;/li&gt;
&lt;li&gt;Build → Clean Project: Removes old compiled files.&lt;/li&gt;
&lt;li&gt;Build → Rebuild Project: Cleans and recompiles the entire project.&lt;/li&gt;
&lt;li&gt;Code → Code Cleanup: Formats, optimizes, and organizes the code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F2j4wjeyykygwnyaal17l.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F2j4wjeyykygwnyaal17l.gif" alt="Image description" width="400" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's all for today. I hope you enjoyed it. If so, I kindly ask you to comment on what you thought and don't forget to like.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>[Resolved] Many places where we need to configure the JDK in IntelliJ</title>
      <dc:creator>VRaptor Code</dc:creator>
      <pubDate>Wed, 27 Nov 2024 14:40:34 +0000</pubDate>
      <link>https://dev.to/douglasmartins7/configurar-o-jdk-no-intellij-4jn1</link>
      <guid>https://dev.to/douglasmartins7/configurar-o-jdk-no-intellij-4jn1</guid>
      <description>&lt;p&gt;If you work with Java or Kotlin, you'll need to configure the JDK in IntelliJ. Below are the important points.&lt;br&gt;
I use asdf, which is a version manager that allows you to install multiple languages. So let's go...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Local configuration per project&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;File -&amp;gt; project structure &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fge83ctqwmcfcigfrjno9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fge83ctqwmcfcigfrjno9.png" alt="Image description" width="800" height="565"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can download the JDK through IntelliJ or point to an installer on your machine.&lt;br&gt;
Each project can use different versions of the JDK, so you can work on projects that require different JDKs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Global configuration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The JDK will be available for all projects in IntelliJ.&lt;br&gt;
When you create a new project, IntelliJ may ask for this JDK as the default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F7umd0qa30fatlqxkimnc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F7umd0qa30fatlqxkimnc.png" alt="Image description" width="800" height="599"&gt;&lt;/a&gt;    &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extras&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configure in Maven.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;File -&amp;gt; Settings -&amp;gt; Build, Execution, Deployment -&amp;gt; Build Tools -&amp;gt; Maven&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F6reaj6t6qwa6ngm8kc4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F6reaj6t6qwa6ngm8kc4z.png" alt="Image description" width="800" height="573"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configure in Gradle.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F6mdcrtsjifx6ao2flogx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F6mdcrtsjifx6ao2flogx.png" alt="Image description" width="800" height="604"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well, that's it for today. Don't forget to leave a comment on what you think.&lt;/p&gt;

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