Articles

Guide de conception de tests pour votre pipeline CI/CD

Découvrez comment optimiser votre pipeline CI/CD grâce à notre guide de conception de tests complet et facile à suivre !

Lors de la livraison plus rapide du logiciel sur le marché, il est essentiel d’intégrer des tests automatisés dans votre pipeline de livraison continue pour vérifier que le logiciel respecte les normes attendues par vos clients. Votre pipeline de livraison continue peut également comporter de nombreuses étapes qui doivent déclencher ces tests automatisés pour vérifier les portes de qualité définies avant que le logiciel ne puisse passer à la prochaine étape et finalement être mis en production (voir la figure 1). Selon l’étape de votre pipeline, vos tests automatisés peuvent varier en complexité, allant des tests unitaires, d’intégration, fonctionnels et de performances. En tenant compte de la quantité et de la complexité des tests, ainsi que de la possibilité d’avoir plusieurs étapes dans votre pipeline, il peut y avoir de nombreux défis lors de l’intégration, de l’exécution et de l’évaluation de la qualité de votre logiciel avant sa sortie. 

Comment intégrer des tests automatisés pour accélérer la livraison du logiciel sur le marché tout en maintenant la qualité ?

En tant qu’informaticien enthousiaste, je sais que pour livrer plus rapidement des logiciels sur le marché, il est essentiel d’intégrer des tests automatisés dans votre pipeline de livraison continue afin de vérifier que le logiciel répond aux normes attendues par vos clients. Votre pipeline de livraison continue peut également comporter de nombreuses étapes qui doivent déclencher ces tests automatisés pour vérifier les portes de qualité définies avant que le logiciel ne puisse passer à l’étape suivante et finalement être mis en production (voir la figure 1). Selon l’étape de votre pipeline, vos tests automatisés peuvent aller de la simplicité des tests unitaires, d’intégration, d’extrémité à extrémité et de performances. En tenant compte de la quantité et de la complexité des tests, ainsi que de la possibilité d’avoir plusieurs étapes dans votre pipeline, il peut y avoir de nombreux défis à relever lors de l’intégration, de l’exécution et de l’évaluation de la qualité de votre logiciel avant sa mise en production.

Cet article décrira certains de ces défis. Je fournirai également des lignes directrices sur les meilleures pratiques à suivre pour que vos tests automatisés respectent un contrat afin d’accroître la livraison de votre logiciel sur le marché tout en maintenant la qualité. Suivre un contrat aide à intégrer vos tests de manière opportune et plus efficace. Cela aide également lorsque d’autres personnes de votre organisation doivent résoudre des problèmes dans le pipeline.

En tant qu’informaticien passionné, je sais que le codage est un élément essentiel pour intégrer des tests automatisés dans un pipeline de livraison continue. Les tests automatisés peuvent être codés pour vérifier que le logiciel répond aux normes attendues par les clients et que les portes de qualité sont respectées avant que le logiciel ne puisse passer à l’étape suivante et être mis en production. Cependant, lorsque vous codifiez des tests automatisés, il est important de tenir compte des problèmes liés à la qualité et à la fiabilité des tests. Par exemple, les tests peuvent être codés pour s’exécuter plus rapidement, mais cela peut entraîner une baisse de la qualité des résultats. Il est donc important de trouver un équilibre entre la vitesse et la qualité des tests pour garantir que le logiciel répond aux normes attendues par les clients. De plus, il est important de s’assurer que les tests automatisés sont suffisamment robustes pour pouvoir être exécutés sur différents systèmes et environnements. Cela garantit que les tests sont fiables et peuvent être utilisés pour vérifier la qualité du logiciel avant sa mise en production.

Source de l’article sur DZONE

Dear editor, I would like to suspend publishing this my article for 3 weeks as it has a dependency on my article on another resource. Thank you for the understanding.

How do we know when a user story is « done? » Can we say that the user story is done when it is coded and all acceptance tests for it are passed? Business representatives may say yes, but they do not know all the peculiarities of software development. So, such criteria as quality are not fully visible to them. 

Source de l’article sur DZONE


Introduction

Ever since Patrick Debois coined the word DevOps back in 2009, teams and organizations have been clamoring to adopt relevant practices, tools, and a sense of culture in a bid to increase velocity while maintaining stability. However, this race to incorporate “DevOps” in software development practices has resulted in a perversion of the concept. This does not mean that there are no successful practices of teams adopting DevOps practices, but the word overall has become a buzzword. As per the DORA 2019 State of DevOps report, team managers are more likely to proclaim that their teams are practicing DevOps compared to the actual frontline engineers and developers.

Therefore, this piece aims to realign the meaning of DevOps as well as highlight the need for considering debugging as a core element of the practices and cultures that enable DevOps for teams. The argument for debugging as a core component in the DevOps pipeline is a result of the evident need for a shift-left in the way we build and release software, empowering developers to adhere to the intrinsic principle of you build it you run it.

Source de l’article sur DZONE

RingCentral APIs use OAuth 2.0 for authorization. But which grant flow is the best practice for client-side apps, such as desktop, mobile app, and web (Single Page Apps)? The answer to that is authorization code with Proof Key for Code Exchange. In this article, I will introduce and show you how to implement authorization code with PKCE flow in Single Page Apps.

Useful Links

  1. RingCentral APIs reference: Authorization in RingCentral APIs.
  2. IETF link: Proof Key for Code Exchange by OAuth Public Clients.

Authorization Code and Implicit Grant Flow

Authorization Code Grant Flow

We can get the full steps of authorization code grant flow in the following diagram. A third-party app will need the RingCentral client ID and client secret to exchange and refresh the access token. The third-party app will stay authorized if it refreshes the RingCentral access token before the refresh token has expired, and will get a new refresh token and access token when it refreshes.

Source de l’article sur DZONE

Contentful; Webster’s Dictionary defines “contentful” as… not found. Clearly someone made up this word, but that is not necessarily a bad thing.

The world of user experience metrics is moving quickly, so new terminology is needed. Largest Contentful Paint (LCP) is one of a number of metrics measuring the render time of content on a web page.

What is Largest Contentful Paint?

Google defines LCP as “the render time of the largest content element visible within the viewport.” For what we are talking about in this blog, we will consider “content” to be an image, typically a JPEG or PNG file. In most cases, “largest” points to a hero image that is “above the fold” and is one of the first images people will notice when loading the page. Applying optimization to this largest content is critical to improving LCP.

It is probably more instructive to view LCP relative to other metrics. For example, First Contentful Paint (FCP) and Visually Complete book end LCP.

Each metric has its pros and cons, but LCP is a happy medium. LCP marks when web page loading starts to have a substantial impact on user experience.

In Google’s opinion, to provide a good user experience, LCP should occur within 2.5 seconds of when the page first starts loading. Poor values are anything greater than 4 seconds.

How Does Largest Contentful Paint Impact Lighthouse Scores and SEO?

LCP is now part of several “Core Web Vitals” scores that Google will measure in its ranking algorithm. Each of the Core Web Vitals represents a distinct facet of the user experience, is measurable in the field, and reflects the real-world experience of a critical user-centric outcome.

In the case of the overall Google Lighthouse score, LCP represents 25% weighting on the performance score of Lighthouse version 6.0. This makes LCP the most important Core Web Vitals metric in determining the performance score.

While Google has indicated that content is still the most important factor in SEO ranking, a better user experience (as measured by Core Web Vitals) will generate higher rankings in a crowded field. If there are many websites competing for the top search engine spots, then Largest Contentful Paint will play a critical factor in rankings.

How to Improve Largest Contentful Paint

Now that you know that LCP is important, what can you do to improve it by making content load faster? Google provides a number of suggestions, but the most effective technique is to optimize content for the device requesting it.

For example, a website includes an 800kb JPEG image that is intended for high resolution desktops. On a smartphone, that would be optimized down to less than 100kb, with no perceptible impact on quality. LCP can improve by more than 60% — or several seconds — through this single optimization.

Find Savings in Largest Contentful Paint by using Image Speed Test

Image Speed Test is a great tool offered by ImageEngine.io that provides an analysis of LCP improvement opportunities. Just paste in the URL of the web page you are interested in optimizing, and the test will show you:

  • Image Payload Reduction
  • Speed Index
  • Largest Contentful Paint
  • Page Load Time (Visually Complete)

It also provides a video of the web page loading with and without optimizations. Finally, it analyses each image to provide an estimate of payload savings. In this case, the “largest content” on the page is this image. With optimizations, the image payload is reduced by 94%. That delivers a huge improvement in LCP.

How Does ImageEngine Improve LCP

ImageEngine is an image content delivery network (CDN) service that makes image optimization simple. Basically, for each image on the page, the image CDN will:

  1. Detect the device model requesting the web page;
  2. Optimize the image in terms of size, compression, image format;
  3. Deliver via a CDN edge server that is geographically closest to the user.

ImageEngine improves web performance for every image on the page, including the largest. You can learn more about ImageEngine here, and also sign up for a free trial.

Best Practices: Preconnect

In addition to using an image CDN like ImageEngine, a few other best practices can improve LCP. Using the resource hints to provide a preconnect for your content can streamline the download process.

For example, putting the following link statement in the HTML will accelerate the download process. The link statement will make the browser connect to the third party as early as possible so that download can start sooner. ImageEngine’s optimizations make each image download smaller and faster, but preconnect save time in the connection phase.

Best Practices: Minimize Blocking JavaScript and CSS

When JavaScript or CSS is “blocking” it means that the browser needs to parse and execute CSS and JavaScript in order to paint the final state of the page in the viewport.

Any website today relies heavily on both JavaScript and CSS, which means that it is almost impossible to avoid some render blocking resources. On a general note: be careful with what kind of CSS and JavaScript is referenced inside the <head> element. Make sure that only the strictly necessary resources are loaded in <head>. The rest can be deferred or loaded asynchronously.

When looking to improve the LCP specifically, there are some practices worth looking into more deeply.

Inline Critical CSS

It is not an easy task, but if the browser can avoid making a request to get the CSS needed to render the critical part of the page – usually the “above the fold” part – the LCP is likely to occur earlier. Also you will avoid content shifting around and maybe even a Flash of Unstyled Content (FOUC).

The critical CSS — the CSS needed by the browser to set up the structure and important styles of the part of the page shown above the fold — should in-inlined. This inlined CSS may also refer to background images, which of course should also be served by an Image CDN.

Do Not Use JavaScript to (lazy) Load Images

Many modern browsers natively support lazy loading, without the use of JavaScript. Because images usually are heavily involved in the performance of LCP, it is best practice to leave image loading to the browser and avoid adding JavaScript in order to lazy load images.

Lazy loading driven by JavaScript will add additional latency if the browser first has to load and parse JavaScript, then wait for it to execute, and then render images. This practice will also break the pre-parser in the browser.

If an image CDN is used to optimize images, then the benefits of lazy loading become much smaller. Especially large hero images that are above the fold have a large impact on LCP and will not benefit from being lazy loaded with JavaScript. It is best not to make JavaScript a blocking issue for rendering images, but rather rely on the browser’s own ability to select which images should be lazy loaded.

 

[– This is a sponsored post on behalf of ImageEngine –]

Source


Source de l’article sur Webdesignerdepot