انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهJNR-045-L04

اختبارات التطبيق الكامل

  • الدرس 4 من 7
  • Junior
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

run the whole application and test it end to end.

الموضوعات المخطط لها

  • @SpringBootTest starts the full context; with webEnvironment = RANDOM_PORT it also starts the web server.
  • Flyway or Liquibase migrations run on the container database, so you test the real schema.
  • Use TestRestTemplate or WebTestClient; the next module adds REST Assured.
  • Keep the number of these tests small; each costs startup time.
  • Cache the Spring context by keeping test configurations identical.
تفاصيل المخطط المبدئي

عرض عملي

a test that posts an order, then reads it back through the repository, with Flyway having created the tables.

اختبر فهمك

What does RANDOM_PORT avoid?

أظهر الإجابة

Port clashes when tests run in parallel or on a busy machine.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.