<?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>Forem: Arjun Attam</title>
    <description>The latest articles on Forem by Arjun Attam (@arjunattam).</description>
    <link>https://forem.com/arjunattam</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%2F184258%2F018de54c-6ed7-444a-ab01-efe0666d09af.jpg</url>
      <title>Forem: Arjun Attam</title>
      <link>https://forem.com/arjunattam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/arjunattam"/>
    <language>en</language>
    <item>
      <title>Fast and reliable cross-browser testing with Playwright 🎭</title>
      <dc:creator>Arjun Attam</dc:creator>
      <pubDate>Wed, 06 May 2020 20:35:22 +0000</pubDate>
      <link>https://forem.com/arjunattam/fast-and-reliable-cross-browser-testing-with-playwright-eig</link>
      <guid>https://forem.com/arjunattam/fast-and-reliable-cross-browser-testing-with-playwright-eig</guid>
      <description>&lt;p&gt;Web developers today are shipping faster. Web apps are becoming increasingly sophisticated and run across all devices—our phones, tablets and desktops—each running a different browser engine. This increase in velocity and targets puts immense pressure on the testing process: automated cross-browser testing has become more important than ever.&lt;/p&gt;

&lt;p&gt;Automated end-to-end tests can be incredibly powerful: by replicating user interactions, they can verify functionality, usability and performance—at least in theory. In practice, end-to-end tests can be slow, flaky and hard to maintain.&lt;/p&gt;

&lt;p&gt;Today we are announcing &lt;a href="https://github.com/microsoft/playwright" rel="noopener noreferrer"&gt;Playwright&lt;/a&gt; – our take on fixing end-to-end testing. Playwright is a &lt;strong&gt;cross-browser automation library&lt;/strong&gt; to write tests that are &lt;strong&gt;fast, reliable and capable&lt;/strong&gt;.&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%2Fuser-images.githubusercontent.com%2F284612%2F81224868-37fa2800-8f9d-11ea-8332-604a68737b0d.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%2Fuser-images.githubusercontent.com%2F284612%2F81224868-37fa2800-8f9d-11ea-8332-604a68737b0d.png" alt="Playwright capabilities across Chromium, Firefox and WebKit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Playwright can test web apps across multiple browsers: Chromium-based browsers like &lt;strong&gt;Google Chrome&lt;/strong&gt; and the &lt;strong&gt;new Microsoft Edge&lt;/strong&gt;, WebKit-based &lt;strong&gt;Apple Safari&lt;/strong&gt; and the Gecko-based &lt;strong&gt;Mozilla Firefox&lt;/strong&gt;. Playwright 1.0 is &lt;a href="https://www.npmjs.com/package/playwright" rel="noopener noreferrer"&gt;available today on NPM&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With a single API, Playwright can automate a wide-range of scenarios across different browsers, with a foundation that emphasizes reliable and fast execution.&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%2Fuser-images.githubusercontent.com%2F284612%2F81224828-2add3900-8f9d-11ea-86b6-a272d56879b1.gif" 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%2Fuser-images.githubusercontent.com%2F284612%2F81224828-2add3900-8f9d-11ea-86b6-a272d56879b1.gif" alt="Getting started with Playwright"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Increased reliability with timeout-free automation
&lt;/h2&gt;

&lt;p&gt;Modern web apps need to be rich and interactive, and dynamically respond to user actions. This asynchronous behavior makes modern apps harder to predictably automate. A network request can take slightly longer than usual and keep the loader spinning.&lt;/p&gt;

&lt;p&gt;Playwright automatically waits for the UI to be ready, which helps create tests that are &lt;strong&gt;reliable to execute&lt;/strong&gt; and &lt;strong&gt;simpler to author&lt;/strong&gt;. For example, a page click will auto-wait for the target element to be visible and ready. Developers and testers can write tests that focus on the scenario, and not on timing or UI state. This significantly improves the maintainability of test code over time.&lt;/p&gt;

&lt;p&gt;Under the hood, Playwright uses an &lt;strong&gt;event-driven architecture&lt;/strong&gt; that can listen to browser events. Playwright tests can accurately wait for DOM changes, network requests or even new console logs. Playwright uses the same protocols that power browser developer tools — tools that developers have grown to love.&lt;/p&gt;

&lt;p&gt;With precise browser events, automation scripts can avoid timeouts. In traditional end-to-end testing, waiting for the app to be ready was often the only way to manage asynchronous behavior. However, timeouts are a slippery slope: they always lead to inconsistent failures or "flaky tests".&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%2Fuser-images.githubusercontent.com%2F284612%2F81224841-2dd82980-8f9d-11ea-9aef-86a5215a8efe.gif" 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%2Fuser-images.githubusercontent.com%2F284612%2F81224841-2dd82980-8f9d-11ea-9aef-86a5215a8efe.gif" alt="Auto-waits on page actions and APIs for more granular control"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Automation that scales: fast, parallelized execution
&lt;/h2&gt;

&lt;p&gt;Playwright is built to deliver &lt;strong&gt;fast, parallelized automation&lt;/strong&gt; in local and cloud environments. A single instance of Chromium, Firefox or WebKit can create multiple isolated and concurrent browser contexts. This significantly improves performance and enables independent &lt;strong&gt;multi-page emulation scenarios&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A single browser context can host multiple web pages and define context-level behavior, such as network interception or authentication credentials. Browser contexts can also emulate mobile viewports, mock geolocation and locale. This enables a single WebKit instance to run multi-page scenarios across multiple device configurations in parallel: desktop, iPhone and iPad.&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%2Fuser-images.githubusercontent.com%2F284612%2F81224855-32044700-8f9d-11ea-819f-709a0bde4d6b.gif" 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%2Fuser-images.githubusercontent.com%2F284612%2F81224855-32044700-8f9d-11ea-819f-709a0bde4d6b.gif" alt="Browser contexts are isolated environments and can emulate various scenarios"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Automating the web of today and tomorrow
&lt;/h2&gt;

&lt;p&gt;The web platform is more capable than ever before and is &lt;a href="https://whatwebcando.today/" rel="noopener noreferrer"&gt;continuously evolving&lt;/a&gt;. Playwright is built to keep up with growing capabilities of web browsers and web apps. This also includes newer browser features that are used by Progressive Web Apps (PWAs). Playwright can automate a wide-range of capabilities across Chromium, Firefox and WebKit, with a single API.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Emulation of mobile viewports, permissions, geolocation and locale&lt;/li&gt;
&lt;li&gt;Support for web components via shadow-piercing selectors&lt;/li&gt;
&lt;li&gt;Network interception for modifying and mocking network activity&lt;/li&gt;
&lt;li&gt;File uploads and downloads&lt;/li&gt;
&lt;li&gt;Scenarios that span multiple frames, tabs and pop-ups&lt;/li&gt;
&lt;li&gt;Trusted native input events from mice and keyboards&lt;/li&gt;
&lt;li&gt;Web workers and out-of-process iframes&lt;/li&gt;
&lt;/ul&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%2Fuser-images.githubusercontent.com%2F284612%2F81224848-2fa1ed00-8f9d-11ea-8f03-62a9117222ae.gif" 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%2Fuser-images.githubusercontent.com%2F284612%2F81224848-2fa1ed00-8f9d-11ea-8f03-62a9117222ae.gif" alt="Playwright can intercept network requests-to abort, modify or mock them"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Get started with Playwright: on local and CI
&lt;/h2&gt;

&lt;p&gt;Playwright 1.0 is &lt;a href="https://www.npmjs.com/package/playwright" rel="noopener noreferrer"&gt;available on NPM&lt;/a&gt; and is ready to use today. The &lt;a href="https://playwright.dev/#path=docs%2Fintro.md" rel="noopener noreferrer"&gt;getting started guide&lt;/a&gt; is a good place to start. Playwright is built to be modular, and can be &lt;a href="https://playwright.dev/#path=docs%2Ftest-runners.md" rel="noopener noreferrer"&gt;used with all popular test runners&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To complement the Playwright NPM package, we are also releasing a &lt;a href="https://github.com/marketplace/actions/run-playwright-tests" rel="noopener noreferrer"&gt;GitHub Action to run Playwright tests&lt;/a&gt; in your CI/CD pipelines with GitHub Actions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thank you!
&lt;/h2&gt;

&lt;p&gt;Playwright is &lt;a href="https://github.com/microsoft/playwright" rel="noopener noreferrer"&gt;developed in the open on GitHub&lt;/a&gt;. We are grateful to our &lt;a href="https://github.com/microsoft/playwright/blob/master/docs/showcase.md" rel="noopener noreferrer"&gt;early adopters&lt;/a&gt;, who have shared painstaking details into their use-cases and have helped shape the Playwright API.&lt;/p&gt;

&lt;p&gt;Playwright is also standing on the shoulders of giants. It would not have happened if not for the efforts of these exceptional teams working on browser engines and automation solutions. We are grateful to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Chromium, Chrome DevTools and Puppeteer teams for working with us upstream&lt;/li&gt;
&lt;li&gt;The WebKit and Web Inspector teams at Apple, Sony, Igalia and elsewhere for accepting our WebKit patches and making WebKit run on Windows and as headless on Linux&lt;/li&gt;
&lt;li&gt;The Firefox team for their efforts in supporting newer automation drivers&lt;/li&gt;
&lt;li&gt;The WebDriver team for pioneering automated end-to-end testing and bringing it to scale&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;—on behalf of the Playwright team&lt;/p&gt;

</description>
      <category>testing</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Chat with your team while you collaborate over code in VS Code</title>
      <dc:creator>Arjun Attam</dc:creator>
      <pubDate>Wed, 30 Oct 2019 17:07:19 +0000</pubDate>
      <link>https://forem.com/arjunattam/chat-with-your-team-while-you-collaborate-over-code-in-vs-code-2boi</link>
      <guid>https://forem.com/arjunattam/chat-with-your-team-while-you-collaborate-over-code-in-vs-code-2boi</guid>
      <description>&lt;p&gt;I have been building &lt;a href="https://github.com/vsls-contrib/chat"&gt;Live Share Chat&lt;/a&gt; over the last year or so, and I recently added support for &lt;strong&gt;direct messages&lt;/strong&gt;: you can now DM your &lt;a href="https://aka.ms/vsls"&gt;VS Live Share&lt;/a&gt; contacts, within or outside a collaboration session.&lt;/p&gt;

&lt;p&gt;Fun fact: Live Share Chat started as an experiment to reduce my constant context-switching between VS Code and Slack. I wanted to see what it would be like to be able to chat about code with my Slack teammates.&lt;/p&gt;

&lt;p&gt;At first, it seemed &lt;em&gt;weird&lt;/em&gt; to add chat to my text editor, but over time, I noticed how developers using VS Live Share started using the extension. It made sense to rename the extension to Live Share Chat, and emphasize the integration (I wrote about this journey &lt;a href="https://github.com/vsls-contrib/chat/issues/418"&gt;here&lt;/a&gt;). The usage on Live Share has grown consistently over time, and that has motivated to keep working on it.&lt;/p&gt;

&lt;p&gt;What do you think about this experience? Have you had a chance to try it out?&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>vscode</category>
    </item>
    <item>
      <title>Virtual collaboration workspaces for teams, classrooms, and communities</title>
      <dc:creator>Arjun Attam</dc:creator>
      <pubDate>Wed, 25 Sep 2019 17:22:30 +0000</pubDate>
      <link>https://forem.com/arjunattam/virtual-collaboration-workspaces-for-teams-classrooms-and-communities-1m2c</link>
      <guid>https://forem.com/arjunattam/virtual-collaboration-workspaces-for-teams-classrooms-and-communities-1m2c</guid>
      <description>&lt;p&gt;The code that we write is the work of many other developers around us: it is shaped and influenced by the teammates who review it, the open source libraries we use, and Stack Overflow answers that we refer to. Code is not written in isolation—it is the result of our interactions with other developers around us.&lt;/p&gt;

&lt;p&gt;GitHub, Stack Overflow and Slack (to pick a few) do an excellent job at connecting us to other developers. But they are disconnected from the process of writing code in an editor, which is where assistance is most needed. We wanted to reduce barriers in seeking and providing assistance, and enable collaboration without having to jump across multiple apps, or wade through distracting notifications. We wanted to build virtual workspaces for teams, classrooms and communities to collaborate.&lt;/p&gt;

&lt;p&gt;To prototype these ideas, we built &lt;a href="https://aka.ms/vsls-spaces" rel="noopener noreferrer"&gt;Live Share Spaces&lt;/a&gt;, an extension for VS Code. Today, we’re excited to share it with you.&lt;/p&gt;

&lt;h1&gt;
  
  
  Get started with Live Share Spaces
&lt;/h1&gt;

&lt;p&gt;Live Share Spaces can be installed through the &lt;a href="https://marketplace.visualstudio.com/items?itemName=vsls-contrib.spaces" rel="noopener noreferrer"&gt;extensions marketplace&lt;/a&gt;. Once you have the extension, you can discover and create spaces. A space is basically just a name that can represent anything: a team (&lt;code&gt;project-xyz&lt;/code&gt;), a language ecosystem (&lt;code&gt;elixir&lt;/code&gt;), or an event (&lt;code&gt;advent-of-code-2019&lt;/code&gt;).&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fm6s64vef9m4l050ep6zc.gif" 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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fm6s64vef9m4l050ep6zc.gif" alt="Live Share Spaces"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Rich ways to connect, within the editor
&lt;/h1&gt;

&lt;p&gt;Live Share Spaces is built on &lt;a href="https://visualstudio.microsoft.com/services/live-share/" rel="noopener noreferrer"&gt;VS Live Share&lt;/a&gt;, which enables rich real-time experiences for developers to collaborate. Developers in a Live Share session can co-edit, debug, and jump into shared servers and terminal sessions. Live Share Spaces builds on the features of VS Live Share: members in a space can share their presence status to show that they are available or busy. They can also invite members into Live Share sessions.&lt;/p&gt;

&lt;p&gt;Live Share Spaces also adds more ways for members to collaborate. Each space has a &lt;strong&gt;chat channel&lt;/strong&gt;, where members can message each other. Each space also has a &lt;strong&gt;readme&lt;/strong&gt;, through which new members can get to know the space, and find useful links to get started. &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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Faysexc62itxvreox78wa.gif" 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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Faysexc62itxvreox78wa.gif" alt="Presence updates, chat, and readme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Seek and provide assistance
&lt;/h1&gt;

&lt;p&gt;Live Share Spaces aims to make it super easy for members to express their intent to seek assistance. Members can create &lt;strong&gt;help requests&lt;/strong&gt; to notify other members of their intent. Other members can join the request to provide assistance, which would put them in a Live Share session hosted by the first user.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ffoje06lpl02q72jc5mw3.gif" 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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ffoje06lpl02q72jc5mw3.gif" alt="Help requests"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In addition to help requests, members can also create Live Share sessions for real-time &lt;strong&gt;code reviews&lt;/strong&gt;. Reviewing code on Live Share is much faster than creating a pull request and then waiting for comments. Members can also create sessions for &lt;strong&gt;broadcasts&lt;/strong&gt;, to live stream their work for team brown bags and community meetups. In all these sessions, users can use &lt;a href="https://dev.to/lostintangent/you-can-t-spell-collaboration-without-communication-2a3o"&gt;existing Live Share features&lt;/a&gt;, like audio calls and comments.&lt;/p&gt;

&lt;h1&gt;
  
  
  Invite members and manage spaces
&lt;/h1&gt;

&lt;p&gt;To invite new members to join your space, you can create and share deep-links to the space. These links can also be shared as a badge on your repo’s readme.&lt;/p&gt;

&lt;p&gt;The first member in a space is called a founder. Founders are like admins that curate the experience for other members: for example, they can make a space private, block/unblock a member, and edit the space readme. A founder can also promote other members to founders, to share the responsibilities of managing the space.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcn4r2zjljzmvm6jje8cj.gif" 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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcn4r2zjljzmvm6jje8cj.gif" alt="Managing the space"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Tell us what you think!
&lt;/h1&gt;

&lt;p&gt;We are excited to release this experiment in the wild, and eager to hear from you on whether this looks interesting. Create a space for your team/community or let us know of issues that block you from doing so.&lt;/p&gt;

&lt;p&gt;You can find us and the code base on &lt;a href="https://github.com/vsls-contrib/spaces" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. You can also connect with us in the &lt;code&gt;vsls&lt;/code&gt; space. Use the &lt;a href="http://vsls.space" rel="noopener noreferrer"&gt;vsls.space&lt;/a&gt; deep-link to join the space in VS Code (or &lt;a href="http://vsls.space?insiders" rel="noopener noreferrer"&gt;vsls.space?insiders&lt;/a&gt;, if you prefer Insiders). Look forward to seeing you there!&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>discuss</category>
      <category>showdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
