flutter - widget tests - why my line coverage not reflected for super constructor call?

365

This is expected behavior.

Source: https://github.com/dart-lang/sdk/issues/38934#issuecomment-803938315

Share:
365
jignesh.world
Author by

jignesh.world

Product minded Software Engineer who focuses on product, their domain and delivers best possible user experience by following industry best practices, architecture, test driven development with CI/CD pipelines Enthusiasm, Devotion to work, Eager & Quick learner Self-motivated and well organised team player Proficient to working with teams on software development life cycle(SDLC) from requirement gathering or planning, defining, designing technical architecture, building or developing, testing, deploying and maintaining applications Well verse with development process/tools like Github Actions, CodeMagic, Fastlane, Jenkins, BuddyBuild, Git workflow, Github workflow, Agile PM tools, Continuous integration and Continuous deployment(CI & CD), Test/Domain driven development with keeping healthy test code coverage, etc.. Currently developing cross platform applications with Flutter(mobile/web/desktop) (Since May 2018) Explored different kinds of architecture on flutter and currently using bloclibrary.dev Proficient to integrate and work with different kind of APIs - REST / GraphQL Backend: REST API development using ExpressJS, PostgREST etc.. Backend: GraphQL API development using Apollo GraphQL server, Hasura(similar to PostGraphile) etc.. Proficient to work with relational databases(MySQL/PostgreSQL) and SQL queries Developed many applications using Firebase Cloud Products (BaaS). Worked on many different user-friendly, aesthetically pleasing and fully functional applications Proficient in object-oriented design, data structures, problem solving, complexity analysis, and debugging Proficient in writing efficient, maintainable, reusable, testable code that preserves privacy and security Proficient to work with many programming languages like Dart, Java, Kotlin, Swift, JavaScript, TypeScript, NodeJS, Python etc.. Regular follower of news, groups, communities, forums and blogs to stay connected and updated Trying to contribute something back to the community by providing mentorship, write articles and creating video tutorials Trained/Mentored and motivated mobile team members(Flutter + Android + iOS)

Updated on January 01, 2023

Comments

  • jignesh.world
    jignesh.world over 1 year

    I have few widgets under test and their super constructor doesn't gets called (some it works fine and for others it won't work as expected after many different tries)

    line coverage - super(key: key) shows in RED for coverage.

    Attaching few images for references..

    Not working as expected

    UserAvatar AppCahcedNetworkImage

    --

    Working as expected

    RoundIconButton AppFlare

    Coverage