No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Testing

    Help
    25
    55
    24274
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      xenetics last edited by xenetics

      Hi

      I am thinking to use Quasa for my next project - I noticed the cli project doesnt have any test suite included though. I spent a good few hours trying to integrate the karma/nightwatch test suite from the regular vue cli webpack template, but no luck - I am not that great with webpack and it’s endless config options.

      Anyone got a exmaple project with a test suite set up I could take a look at? Thanks! Looking forward to getting going with Quasar.

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        @xenetics The vue1 template (quasar init default#vue1) has unit and e2e testing included, but it uses Webpack 1. Not really recommending it as it won’t be further updated so you can bump into several issues. When we switched to Webpack 2 this was dropped to some issues regarding Vue Router. It’s relatively easy to port that to the latest (default) template which uses Webpack 2. There will be official support for Webpack 2 in the future, but currently it’s not high on the priority list due to very low demand. Cheers.

        1 Reply Last reply Reply Quote 0
        • X
          xenetics last edited by

          Hi! Thanks for the quick reply. Just to clarify, you recommend porting the vue1 template to vue2 then? (while using webpack1) or using the latest, and porting the test setup from th vue1 template?

          1 Reply Last reply Reply Quote 0
          • X
            xenetics last edited by

            Hey again,

            What are the main difficulties you foresee in adding testing? Karma compatibility with Webpack 2?

            IF you can point me in the right direction I am interested in setting up testing and hopefully contributing. I want to use quasar for a internal company project, but no way to test is a deal breaker.

            Thanks.

            rstoenescu 1 Reply Last reply Reply Quote 1
            • rstoenescu
              rstoenescu Admin @xenetics last edited by

              @xenetics There’s no difficulty in setting the unit and e2e testing. Currently don’t want to release a half baked testing until I figure out a good way on making components which use VueRouter testable. That would be the last milestone.

              1 Reply Last reply Reply Quote 0
              • Martin
                Martin last edited by

                Is anyone already writing unit tests for at least some basic methods/functions, in a customized Quasar 2.x project? It’s not my top priority right now (still in alpha stage) but at some point I’d like to switch to test driven dev. It’s a scary thought to have my app on a lot of phones without any testing.

                1 Reply Last reply Reply Quote 1
                • M
                  MusicForMellons last edited by

                  Same here.

                  1 Reply Last reply Reply Quote 0
                  • B
                    boriscy last edited by

                    Same here, need unit testing and e2e.

                    1 Reply Last reply Reply Quote 0
                    • rstoenescu
                      rstoenescu Admin last edited by

                      Will see what I can do. Time is the only problem 😞

                      1 Reply Last reply Reply Quote 1
                      • D
                        dlevin last edited by

                        What are the issues you’re running into with vue-router? I’m currently trying to set up testing similar to what is generated by the vue-cli webpack template but am struggling…

                        1 Reply Last reply Reply Quote 1
                        • P
                          paul last edited by

                          Unit testing and e2e testing is really necessary for such a great framework as Quasar.

                          1 Reply Last reply Reply Quote 0
                          • M
                            MusicForMellons last edited by

                            For e2e might consider Testcafe (in place of Nightwatch):
                            Pros:
                            easy install
                            complete test harness
                            javascript ES2016 with (async/await)
                            flexible selector system
                            smart assertions with retry policy
                            reports

                            1 Reply Last reply Reply Quote 1
                            • L
                              leon last edited by

                              Yes, im starting use Testcafe
                              Its like convention over configurations, and i love it.
                              Very easy. All you need
                              Adding to @MusicForMellons

                              • screenshot fail steps
                              • no need extra code, ex: wait doom element …
                              • fast
                              1 Reply Last reply Reply Quote 0
                              • LaurentPayot
                                LaurentPayot last edited by LaurentPayot

                                I evaluated several e2e testing solutions and I ended choosing Codecept over Testcafé for its conciseness. Nightmare (electron) integration is also a nice feature.

                                Feature('CodeceptJS Demonstration');
                                
                                Scenario('submit form successfully', (I) =>
                                  I.amOnPage('/documentation')
                                  I.fillField('Email', 'hello@world.com')
                                  I.fillField('Password', '123456')
                                  I.checkOption('Active')
                                  I.checkOption('Male');
                                  I.click('Create User')
                                  I.see('User is valid')
                                  I.dontSeeInCurrentUrl('/documentation')
                                });
                                

                                Anyway Quasar should let us chose whatever e2e testing solution we want, as e2e testing should be totally decoupled from the implementation.

                                1 Reply Last reply Reply Quote 0
                                • P
                                  paul last edited by

                                  Qusar really needs support for typescript and unit testing.
                                  I started a github repo where I try to integrate both but I need help.

                                  https://github.com/paulvanbladel/quasar-ts

                                  There are 2 branches:
                                  master : contains support for typescript and that works stable.
                                  unittests: still is still experimental and that’s the place where I need help.
                                  Please make PR’s so that we can get unit testing working.
                                  Cheers.

                                  1 Reply Last reply Reply Quote 0
                                  • rstoenescu
                                    rstoenescu Admin last edited by

                                    @paul There are many people interested in Typescript full support. I’ll make a team for this and you along whoever else is interested can participate in making an official Typescript support repo. I’ll set everything up, but after I finish up v0.14. Anyone interested in Typescript drop me an email pls. Thanks!

                                    1 Reply Last reply Reply Quote 0
                                    • druppy
                                      druppy last edited by

                                      Should we not “just” have a quasar.d.ts file (I have one in my project, that could be a good start that i could add in a PR).

                                      Making Quasar a pure TS project would be fun, but I am not sure this would benefit many at the moment.

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        paul last edited by

                                        @rstoenescu Thanks for that. Keep us informed. Typescript is the way go for serious js work.

                                        1 Reply Last reply Reply Quote -1
                                        • s.molinari
                                          s.molinari last edited by

                                          Typescript is the way go for serious js work.

                                          Why?

                                          Scott

                                          1 Reply Last reply Reply Quote 2
                                          • druppy
                                            druppy last edited by

                                            To manage a large amount of source code base, you need all the help you can get.

                                            By using typescript you get a language that looks and feels like JS, but with lovely static type checks, templates and nice transpiling abilities.

                                            I will recommend it any day, even for small projects, it is really worth it !

                                            LaurentPayot 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post