SlideShare a Scribd company logo
1 of 5
IMPLEMENTATION OF HALSTEAD’S METRICS




AIM:

    To measure the given software implementation using Halstead’s metrics and test it by
path testing method.

PROCEDURE:

TEST PLANNING:

   1. Test strategy
          Scope of testing
                    To test the path of implementation using Halstead’s metrics.
          Test deliverables
                    To test the measurements of the given program using C language.
                                • Calculate vocabulary and length using
                                    Vocabulary=n1+n2
                                    Length=N1+N2
                                    N1=n1log (n1)
                                • Calculate Volume
                                       V=Nlog(n)
                                • Calculate Level ,Effort and Fault
                                        L=V*/V
                                        E=V/L

          Tools used win runner & C programming.
   2. Test plan
         It is a document to say what to test, when to test, how to test, who to test.

                                  •   What to test- to find the Volume ,Effort and Fault
                                      using C program.
                                  •   How to test-by using Win Runner.
                                  •   who to test- Developer.
                                  •   When to test-after executing C program.


   3. Test bed- Win Runner and C programming language.

TEST DEVELOPMENT:

       Test cases
             i. volume
ii.     effort
          iii.     no of distinct operator
          iv.      no of distinct operands
           v.      total no of operator
          vi.      total no of operands


TEST EXECUTION:


     Step 1: Start the program
     Step 2: Input a and b
     Step 3: addition of a and b is printed
     Step 4: Assign n1,n2,N1,N2 to no of operators and operands
             n1No of distinct operators in a program
             n2No of distinct operands in a program
             n1No of operator occurrences
             n2No of operand occurrences
     Step 5: Calculate vocabulary and length using
             Vocabulary=n1+n2
              Length=N1+N2
              N1=n1log (n1)

     Step 6:
                 V=Nlog (n)

     Step 7: Calculate level and Effort and Fault
             L=v*/v
             E=v/L


CODING:

                 #include<stdio.h>
                 #include<conio.h>
                  void main()
                   {
                  float a,b,c,N,N1,N2,n,n1,n2,D,V,E;
                  clrscr();
                  printf("addtion of two numn");
                  printf("enter a and b value n");
                  scanf("%f %f",&a,&b);
c= a+b;
           printf("the result is %fn",c);
           n1=3;
           n2=11;
           N1=8;
           N2=19;
           N=N1+N2;
           n=n1+n2;
           V=N*log(n);
           D=n1/2*n2/2;
           E=D*V;
           printf("program length n %f",N);
           printf("program vocabularyn %f",n);
           printf("volumen %f",V);
           printf("difficulty n %f",D);
           printf("effortn %f",E);
           getch();
            }



TEST REPORTING:
Addition of two numbers
Enter the a and b
32
5
Program length 27.0000
Program vocabulary 14.0000
Volume -882360.0000
Effort 8.250000
Difficulty-7279470


TEST RESULT ANALYSIS:


      Step1: Initialize the win runner

             Start      programs         win runner     win runner

      Step2: Create a new html document to be tested and save it on the desktop
      Step3: In win runner create a new task
      Step4: Click on record button and open the saved html file
      Step5: Then click on stop button the file will be recorded automatically
      Step6: Then click on the button Run from top,
             This will automatically give the test result as
              Pass: If executed with out errors
              Fail: If executed with some errors
             And the execution time will also be displayed
      Step7: Then go to Tools         GUI Map Editor
             And save the file at some location say for example “desktop”.
RESULT:
      Once the test meets the exit criteria the activities such as capturing the key output
lessons learned result,logs,documents related to the project are achieved and used as
reference for next project .

More Related Content

What's hot

Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
Sung Kim
 

What's hot (20)

Vedic Calculator
Vedic CalculatorVedic Calculator
Vedic Calculator
 
Personalized Defect Prediction
Personalized Defect PredictionPersonalized Defect Prediction
Personalized Defect Prediction
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
 
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
Automatically Generated Patches as Debugging Aids: A Human Study (FSE 2014)
 
ERA - Clustering and Recommending Collections of Code Relevant to Task
ERA - Clustering and Recommending Collections of Code Relevant to TaskERA - Clustering and Recommending Collections of Code Relevant to Task
ERA - Clustering and Recommending Collections of Code Relevant to Task
 
Comparing model coverage and code coverage in Model Driven testing: an explor...
Comparing model coverage and code coverage in Model Driven testing: an explor...Comparing model coverage and code coverage in Model Driven testing: an explor...
Comparing model coverage and code coverage in Model Driven testing: an explor...
 
Survey on Software Defect Prediction
Survey on Software Defect PredictionSurvey on Software Defect Prediction
Survey on Software Defect Prediction
 
Partitioned Based Regression Verification
Partitioned Based Regression VerificationPartitioned Based Regression Verification
Partitioned Based Regression Verification
 
STAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash ReproductionSTAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash Reproduction
 
Cocomo m odel
Cocomo m odelCocomo m odel
Cocomo m odel
 
system verilog
system verilogsystem verilog
system verilog
 
DISE - Software Testing and Quality Management
DISE - Software Testing and Quality ManagementDISE - Software Testing and Quality Management
DISE - Software Testing and Quality Management
 
Munna Vai Project Presentation Demo
Munna Vai Project Presentation DemoMunna Vai Project Presentation Demo
Munna Vai Project Presentation Demo
 
20050713 critical paths for gui regression testing
20050713 critical paths for gui regression testing20050713 critical paths for gui regression testing
20050713 critical paths for gui regression testing
 
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
CrashLocator: Locating Crashing Faults Based on Crash Stacks (ISSTA 2014)
 
Software fault management
Software fault managementSoftware fault management
Software fault management
 
Verification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICsVerification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICs
 
Presentation slides: "How to get 100% code coverage"
Presentation slides: "How to get 100% code coverage" Presentation slides: "How to get 100% code coverage"
Presentation slides: "How to get 100% code coverage"
 
Tcs nqt 2019 p 1
Tcs nqt 2019 p 1Tcs nqt 2019 p 1
Tcs nqt 2019 p 1
 
Tcs nqt 2019 p 2
Tcs nqt 2019 p 2Tcs nqt 2019 p 2
Tcs nqt 2019 p 2
 

Viewers also liked (8)

Chapter 6 software metrics
Chapter 6 software metricsChapter 6 software metrics
Chapter 6 software metrics
 
halstead software science measures
halstead software science measureshalstead software science measures
halstead software science measures
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metrics
 
Black box & white-box testing technique
Black box & white-box testing techniqueBlack box & white-box testing technique
Black box & white-box testing technique
 
Software Metrics
Software MetricsSoftware Metrics
Software Metrics
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
13 software metrics
13 software metrics13 software metrics
13 software metrics
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 

Similar to Implementation of halstead

Cis 170 i lab 2 of 7
Cis 170 i lab 2 of 7Cis 170 i lab 2 of 7
Cis 170 i lab 2 of 7
helpido9
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
Babul Mirdha
 
La5 Program Phases
La5 Program PhasesLa5 Program Phases
La5 Program Phases
Cma Mohd
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interface
cis247
 
Cis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interfaceCis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interface
sdjdskjd9097
 

Similar to Implementation of halstead (20)

software testing
software testingsoftware testing
software testing
 
Devry cis-170-c-i lab-3-of-7-looping
Devry cis-170-c-i lab-3-of-7-loopingDevry cis-170-c-i lab-3-of-7-looping
Devry cis-170-c-i lab-3-of-7-looping
 
Devry cis-170-c-i lab-3-of-7-looping
Devry cis-170-c-i lab-3-of-7-loopingDevry cis-170-c-i lab-3-of-7-looping
Devry cis-170-c-i lab-3-of-7-looping
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17
 
DSA Lesson 2 - Algorithm and Flowcharting.pdf
DSA Lesson 2 - Algorithm and Flowcharting.pdfDSA Lesson 2 - Algorithm and Flowcharting.pdf
DSA Lesson 2 - Algorithm and Flowcharting.pdf
 
Cis 170 i lab 2 of 7
Cis 170 i lab 2 of 7Cis 170 i lab 2 of 7
Cis 170 i lab 2 of 7
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
 
SE2023 0401 Software Coding and Testing.pptx
SE2023 0401 Software Coding and Testing.pptxSE2023 0401 Software Coding and Testing.pptx
SE2023 0401 Software Coding and Testing.pptx
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
 
Devry cis 170 c i lab 3 of 7 looping
Devry cis 170 c i lab 3 of 7 loopingDevry cis 170 c i lab 3 of 7 looping
Devry cis 170 c i lab 3 of 7 looping
 
Devry cis 170 c i lab 3 of 7 looping
Devry cis 170 c i lab 3 of 7 loopingDevry cis 170 c i lab 3 of 7 looping
Devry cis 170 c i lab 3 of 7 looping
 
UNIT-2-PPTS-DAA.ppt
UNIT-2-PPTS-DAA.pptUNIT-2-PPTS-DAA.ppt
UNIT-2-PPTS-DAA.ppt
 
La5 Program Phases
La5 Program PhasesLa5 Program Phases
La5 Program Phases
 
Sw metrics for regression testing
Sw metrics for regression testingSw metrics for regression testing
Sw metrics for regression testing
 
Cis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interfaceCis247 a ilab 1 of 7 creating a user interface
Cis247 a ilab 1 of 7 creating a user interface
 
Cis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interfaceCis247 i lab 1 of 7 creating a user interface
Cis247 i lab 1 of 7 creating a user interface
 
Software metrics
Software metricsSoftware metrics
Software metrics
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 

More from vamshi batchu (6)

Testing
Testing Testing
Testing
 
Transactionflow
TransactionflowTransactionflow
Transactionflow
 
C++ material
C++ materialC++ material
C++ material
 
Data flowtesting doc
Data flowtesting docData flowtesting doc
Data flowtesting doc
 
Testing doc
Testing docTesting doc
Testing doc
 
Path testing
Path testingPath testing
Path testing
 

Recently uploaded

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Recently uploaded (20)

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

Implementation of halstead

  • 1. IMPLEMENTATION OF HALSTEAD’S METRICS AIM: To measure the given software implementation using Halstead’s metrics and test it by path testing method. PROCEDURE: TEST PLANNING: 1. Test strategy  Scope of testing To test the path of implementation using Halstead’s metrics.  Test deliverables To test the measurements of the given program using C language. • Calculate vocabulary and length using Vocabulary=n1+n2 Length=N1+N2 N1=n1log (n1) • Calculate Volume V=Nlog(n) • Calculate Level ,Effort and Fault L=V*/V E=V/L  Tools used win runner & C programming. 2. Test plan It is a document to say what to test, when to test, how to test, who to test. • What to test- to find the Volume ,Effort and Fault using C program. • How to test-by using Win Runner. • who to test- Developer. • When to test-after executing C program. 3. Test bed- Win Runner and C programming language. TEST DEVELOPMENT: Test cases i. volume
  • 2. ii. effort iii. no of distinct operator iv. no of distinct operands v. total no of operator vi. total no of operands TEST EXECUTION: Step 1: Start the program Step 2: Input a and b Step 3: addition of a and b is printed Step 4: Assign n1,n2,N1,N2 to no of operators and operands n1No of distinct operators in a program n2No of distinct operands in a program n1No of operator occurrences n2No of operand occurrences Step 5: Calculate vocabulary and length using Vocabulary=n1+n2 Length=N1+N2 N1=n1log (n1) Step 6: V=Nlog (n) Step 7: Calculate level and Effort and Fault L=v*/v E=v/L CODING: #include<stdio.h> #include<conio.h> void main() { float a,b,c,N,N1,N2,n,n1,n2,D,V,E; clrscr(); printf("addtion of two numn"); printf("enter a and b value n"); scanf("%f %f",&a,&b);
  • 3. c= a+b; printf("the result is %fn",c); n1=3; n2=11; N1=8; N2=19; N=N1+N2; n=n1+n2; V=N*log(n); D=n1/2*n2/2; E=D*V; printf("program length n %f",N); printf("program vocabularyn %f",n); printf("volumen %f",V); printf("difficulty n %f",D); printf("effortn %f",E); getch(); } TEST REPORTING:
  • 4. Addition of two numbers Enter the a and b 32 5 Program length 27.0000 Program vocabulary 14.0000 Volume -882360.0000 Effort 8.250000 Difficulty-7279470 TEST RESULT ANALYSIS: Step1: Initialize the win runner Start programs win runner win runner Step2: Create a new html document to be tested and save it on the desktop Step3: In win runner create a new task Step4: Click on record button and open the saved html file Step5: Then click on stop button the file will be recorded automatically Step6: Then click on the button Run from top, This will automatically give the test result as Pass: If executed with out errors Fail: If executed with some errors And the execution time will also be displayed Step7: Then go to Tools GUI Map Editor And save the file at some location say for example “desktop”.
  • 5. RESULT: Once the test meets the exit criteria the activities such as capturing the key output lessons learned result,logs,documents related to the project are achieved and used as reference for next project .