شماره ركورد
25808
شماره راهنما
COM2 714
عنوان
توليد خودكار آزمونهاي توسعه رفتار محور با استفاده از مدلهاي زباني و گراف دانش
مقطع تحصيلي
كارشناسي ارشد
رشته تحصيلي
مهندسي كامپيوتر - نرم افزار
دانشكده
مهندسي كامپيوتر
تاريخ دفاع
1404/10/30
صفحه شمار
114 ص.
استاد راهنما
رضا رمضاني , محمدرضا شعرباف
كليدواژه فارسي
توسعه رفتار محور , آزمون خودكار , مدلهاي زباني بزرگ , گراف دانش , توليد كد آزمون
چكيده فارسي
چكيده
با گسترش روزافزون سيستمهاي نرمافزاري و پيچيدگي فزايندهي فرآيندهاي توسعه، آزمون نرمافزار بهعنوان يكي از مراحل كليدي در تضمين كيفيت و پايداري سيستم مطرح است. در ميان رويكردهاي نوين آزمون، توليد خودكار آزمونهاي رفتاري از روي سناريوهاي زبان طبيعي (نظير گركين) نقش مهمي در افزايش بهرهوري و كاهش خطاي انساني ايفا ميكند. با اين حال، روشهاي موجود براي توليد خودكار آزمون در چارچوب توسعهي رفتارمحور هنوز با چالشهايي همچون تفسير نادرست نيازمنديهاي متني، وابستگي بالا به قوانين ازپيشتعريفشده و ناتواني در درك روابط معنايي پيچيده ميان اجزاي سناريو مواجهاند.پژوهش حاضر با هدف رفع اين محدوديتها، چارچوبي نوآورانه مبتني بر ادغام گراف دانش و مدلهاي زباني بزرگ ارائه ميدهد كه قادر است سناريوهاي گركين را بهصورت خودكار به كد آزمون رفتار در چارچوب Behave تبديل كند. در اين روش، ابتدا سناريوهاي گركين از طريق فرايندي چندمرحلهاي به گراف دانش ساختيافته تبديل ميشوند تا موجوديتها، كنشها و روابط ميان آنها بهشكل مفهومي بازنمايي شود. سپس گراف دانش توليدشده به همراه كد منبع سيستم و سناريوي اوليه به مدل زباني داده ميشود تا كد آزمون نهايي در قالب گامهاي Given@، @When و Then@ توليد گردد. در اين پژوهش چهار رويكرد براي ساخت گراف دانش بررسي شده است كه شامل رويكرد مبتني بر مهندسي پرامپت با مدل Gemma-3-27B-IT، رويكرد مبتني بر مدلهاي پردازش زبان طبيعي با استفاده از Rebel-large، رويكرد گرافدانش پويا با استفاده از لنگچين و نئوفورجي براي ساخت گرافهاي پويا و رويكرد مبتني بر تعبيههاي معنايي و شبكههاي گراف عصبي ميباشد. نتايج تجربي نشان داد كه تركيب گراف دانش با مدلهاي زباني بزرگ دقت، انسجام و تفسيرپذيري آزمونهاي توليدي را افزايش ميدهد و موجب همترازي بالاتر ميان سناريوهاي توصيفي و كدهاي آزمون اجرايي ميگردد. نوآوري اصلي پژوهش حاضر در ارائهي چارچوبي هوشمند براي نگاشت مستقيم زبان طبيعي به كد آزمون از طريق لايهي مياني گراف دانش است كه پيشتر در هيچيك از مطالعات مشابه به اين صورت تركيبي بهكار نرفته است. اين رويكرد ميتواند بهعنوان گامي مؤثر در مسير خودكارسازي آزمون نرمافزار و توسعه سيستمهاي قابلتبيين و هوشمند در آينده مورد استفاده قرار گيرد.
كليدواژه لاتين
Behavior-Driven Development (BDD) , Automated Testing , Large Language Models (LLMs) , Knowledge Graphs , Test Code Generation
عنوان لاتين
Automatic generation of behavior-based development tests using language models and knowledge graphs
گروه آموزشي
مهندسي نرم افزار
چكيده لاتين
Abstract
With the rapid expansion of software systems and the increasing complexity of development processes, software testing has emerged as a key stage in ensuring system quality and stability. Among modern testing approaches, the automatic generation of behavioral tests from natural language scenarios (such as Gherkin) plays a significant role in increasing productivity and reducing human error. However, existing methods for automated test generation within the Behavior-Driven Development (BDD) framework still face challenges, including incorrect interpretation of textual requirements, heavy dependence on predefined rules, and an inability to understand complex semantic relationships among scenario components. To address these limitations, this research proposes an innovative framework based on the integration of Knowledge Graphs (KGs) and Large Language Models (LLMs), capable of automatically transforming Gherkin scenarios into behavioral test code within the Behave framework. In this approach, Gherkin scenarios are first converted through a multi-stage process into a structured knowledge graph in order to conceptually represent entities, actions, and relationships among them. The generated knowledge graph, together with the system source code and the original scenario, is then provided to the language model to produce the final test code in the form of @Given, @When, and @Then steps. In this study, four approaches for knowledge graph construction are examined, including a prompt-engineering-based approach using the Gemma-3-27B-IT model, an NLP-based approach using Rebel-large, a dynamic knowledge graph approach leveraging LangChain and Neo4j for dynamic graph construction, and a semantic embedding and Graph Neural Network (GNN)-based approach. Experimental results demonstrate that integrating knowledge graphs with large language models improves the accuracy, coherence, and interpretability of generated tests and leads to stronger alignment between descriptive scenarios and executable test code. The primary innovation of this research lies in presenting an intelligent framework for directly mapping natural language to executable test code through an intermediate knowledge graph layer, an integrated approach that has not previously been employed in this combined manner in related studies. This method represents an effective step toward automated software testing and the development of explainable and intelligent systems in the future.
تعداد فصل ها
6
فهرست مطالب pdf
158641
نويسنده