Home / Companies / Cypress / Blog / December 2019

December 2019 Summaries

6 posts from Cypress

Filter
Month: Year:
Post Summaries Back to Blog
Gleb Bahmutov's blog post explores the capabilities of the Cypress Test Runner in monitoring and asserting network calls within web applications. By spying on and stubbing network requests, developers can ensure that interactions with backend servers, APIs, and third-party services are executed as expected. The post provides detailed guidance on confirming the accuracy of network requests and responses, highlighting methods such as using the DevTools Network tab, setting up assertions to verify properties like HTTP status and response data, and employing the cy-spok plugin for more efficient and comprehensive testing. Additionally, it discusses strategies for handling multiple network calls, controlling application timing using cy.clock and cy.tick, and offers insights into improving test efficiency. Through these techniques, developers can enhance the reliability, functionality, and security of web applications, while also benefiting from a more streamlined and informative testing process.
Dec 23, 2019 2,029 words in the original blog post.
In a recent webcast presented by Gleb Bahmutov, VP of Engineering at Cypress, and Murat Ozcan, Test Lead at Siemens SW Hub, the focus was on how Siemens SW Hub has significantly enhanced their test productivity using Cypress for their Smart Infrastructure cloud product, Building Operator. The presentation highlighted the team's impressive accomplishments, such as reducing test code by 49%, increasing productivity by 38%, and speeding up test execution by 375%. Attendees were introduced to advanced UI and API tests utilized by Siemens, as well as community-created plugins for the Cypress Test Runner. The webcast, which was broadcasted via Zoom and YouTube Live, received interactive participation with questions submitted through Slido, and the hosts promised to answer any unresolved questions post-event. Viewers who provided feedback through a survey were thanked and promised a surprise, while future webcasts were teased with an invitation to follow Cypress on Twitter for updates.
Dec 18, 2019 278 words in the original blog post.
With the increasing support for Dark Mode in operating systems and browsers, web developers are encouraged to accommodate both light and dark appearances in their applications. This involves utilizing CSS media queries to specify styles based on the user's OS color scheme preference, and best practices suggest separating these styles into distinct stylesheets to minimize download size. Testing these appearances can be efficiently managed using tools like Cypress, which allow for forced Dark Mode testing via browser flags and JavaScript. However, forcing Light Mode isn't as straightforward, necessitating workarounds such as using JavaScript to dynamically load stylesheets based on media queries. This approach enables comprehensive testing of both light and dark modes, ensuring that web applications maintain aesthetic and functional integrity across different user preferences. Additionally, integrating accessibility color tests and incorporating appearance checks into smoke tests can further enhance the robustness of an application's design across varying display modes.
Dec 13, 2019 949 words in the original blog post.
Filip Hric, a QA lead at Slido and a Cypress ambassador, shares his experiences and insights from conducting a Cypress workshop at TestCrunch in Brno, emphasizing the importance of thorough preparation and structured planning for effective teaching. He highlights the significance of dividing workshops into theoretical, practical, and discussion sections to enhance learning and engagement, and advises on troubleshooting by preparing participants in advance for technical installations. Recognizing the value of feedback, Hric suggests fostering an interactive environment where participants feel comfortable asking questions and providing feedback, using tools like Slido for anonymous polling to identify challenging topics. He underscores the importance of collaboration, encouraging participants to help each other during practical sessions, drawing inspiration from other successful workshops he has attended. Filip reflects on the positive feedback received and extends an invitation for further tips and feedback from readers to improve future workshops.
Dec 12, 2019 794 words in the original blog post.
In the blog post, Gleb Bahmutov discusses the importance of using meaningful smoke tests alongside comprehensive end-to-end (E2E) and unit tests to ensure a robust user experience for web applications. Despite achieving 100% code coverage with tools like Cypress, Bahmutov argues that this alone does not guarantee a flawless user experience across different browsers. He suggests focusing on running all tests in one browser and conducting smoke tests in others, such as Firefox, to quickly identify major issues that could disrupt the user experience. Using the TodoMVC application as an example, he demonstrates how a single smoke test can verify key features like adding, completing, and viewing tasks, achieving substantial code coverage. Bahmutov emphasizes the utility of smoke tests in assessing application functionality across various screen resolutions and browsers, thereby ensuring a smooth deployment process. The approach streamlines testing efforts while maintaining high-quality user experiences across platforms.
Dec 06, 2019 746 words in the original blog post.
The blog post by Benjie Gillam, a maintainer of PostGraphile, outlines the challenges and solutions for integrating end-to-end (E2E) testing into full-stack JavaScript development without disrupting the workflow. The article introduces Graphile Starter, an advanced starter project aimed at streamlining full-stack JavaScript development by incorporating essential tools such as Jest for unit and GraphQL testing, and Cypress for E2E testing. It emphasizes the importance of testing in open-source development for efficiency and reliability, highlighting the need for deterministic tests to avoid productivity loss due to non-reproducible failures. The post details how Cypress can be used to run tests directly against the development instance, maintaining workflow convenience while using conventions for test data to ensure repeatability. It also describes the implementation of server commands via Cypress to manage test data, and the necessity of secure server-side command handling, which is only enabled in test or development environments to prevent vulnerabilities.
Dec 03, 2019 1,676 words in the original blog post.