• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

Exploring QA Opportunities & Challenges When Transition from HTMX to HMPL.js

Sascha Оффлайн

Sascha

Заместитель Администратора
Команда форума
Администратор
Регистрация
9 Май 2015
Сообщения
1,483
Баллы
155

This article was inspired by

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

discussing replacing HTMX with a new module called HMPL.js. From a QA Engineer’s POV, there are many important lessons to be learned from this approach
What is HTMX and HMPL.js?
HTMX is a frontend library that allows page manipulation via HTML attributes such as “hx-post”, “hx-target”, and “hx-swap” without writing explicit JavaScript. HTMX uses “XMLHttpRequest” as the main engine behind its AJAX


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

is a modern alternative. It uses a fetch API based approach and pure JavaScript to handle requests and responses, as well as templating using {{ … }} placeholders.

And, after reading the article by Anthony Max, I started to see the approach in a different light — especially as a QA Engineer. There are a lot of interesting things that come up, both in terms of technical challenges and quality improvement opportunities, that are worth discussing briefly but deep!

Opportunities For QA Engineer
More Control Over Testing
, HMPL uses fetch explicitly, so QA can easily:

  • Install mocks/interceptors (using MSW or Playwright)
  • Test payloads and headers with precision
  • Simulate error handling

JavaScript Skill Development, The transition to HMPL provides an opportunity to deepen understanding of:

  • Async/await
  • Fetch API & Error Handling
  • Dynamic DOM Manipulation

Early Involvement in Technical Decisions, As a QA, you can be more active in:

  • Determining testable structures
  • Developing testing strategies based on full control on the JS side
  • Providing input early on in frontend architecture development

Challenges to Anticipate
Lack of Documentation & Community
, HMPL is still relatively new. This means:

  • Few references
  • Minimal best practices
  • Must do a lot of self-exploration

Testing Complexity Increases, As logic moves from HTML to JavaScript, QA needs to:

  • Read JS code to trace request flow
  • Understand response structure & target DOM
  • Anticipate race conditions and async rendering

Hidden Bug Risk, Error handling can be overlooked

  • Dynamic DOM structures are prone to selector breaks
  • API response schemas need explicit validation

Based on my opinion above and after exploring some additional references, I realized that the case studies that are worth considering are as follows:

Sample case
Context: A frontend team replaced HTML with HMPL on a user registration form to be more flexible in processing data and handling custom validation

Technical Changes

  • HTMX originally used hx-post=”/register” directly in the form tag.
  • In HMPL, the form is rebuilt with a JavaScript “onSubmit” handler, which uses fetch(‘/register’, { method: ‘POST’, body: JSON.stringify(…) })

Challenge

  • Need to rewrite test script that previously only checked for automatic DOM changes from HTML
  • Need to validate fetch payload contents manually
  • Create new test scenario for 422 error response and its handling in JavaScript

Solution

  • Using Mock Service Worker (MSW) to fake server response, if needed
  • Adding assertion to JSON request structure
  • Simulating error response and validating error message rendering in form

Result

  • QA gets full visibility into a form’s data flow
  • Test automation becomes more resilient to markup changes
  • Developers and QA work more closely together because the flow is no longer “hidden” in HTML attributes

Conclusion

HMPL offers high flexibility for development teams, but demands more technical and adaptive QA. So if you are a QA Engineer who wants to level up and be relevant in modern architecture, understanding the transition from HTMX to HMPL is a very valuable opportunity and worth trying or learning more deeply



Источник:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу