Giter Site home page Giter Site logo

Comments (2)

krmorse avatar krmorse commented on May 31, 2024

Yeah, totally. Here are the docs for how to use it: https://help.rallydev.com/apps/2.1/doc/#!/guide/testing_apps

from rally-app-builder.

vaidsu avatar vaidsu commented on May 31, 2024

@krmorse thanks for your quick response.

I am done with writing tests and making it work.

The issue is not about writing those, but more about generating coverage for those.

I tried different techniques, vanilla istanbul, karma runner, etc.

I am able to generate coverage to some extent on the example crud app, but for some reason, I guess the dependency is not loaded, so the tests that are passing through grunt is not passing through karma,

Here is the output:

./node_modules/.bin/karma start karma.conf.js 
28 04 2018 12:57:11.596:INFO [karma]: Karma v2.0.2 server started at http://0.0.0.0:9876/
28 04 2018 12:57:11.600:INFO [launcher]: Launching browser Chrome with unlimited concurrency
28 04 2018 12:57:11.608:INFO [launcher]: Starting browser Chrome
28 04 2018 12:57:12.545:INFO [Chrome 65.0.3325 (Mac OS X 10.11.6)]: Connected on socket GPmP82NRivyoe1ErAAAA with id 26199195
Chrome 65.0.3325 (Mac OS X 10.11.6): Executed 0 of 5 SUCCESS (0 secs / 0 secs)
28 04 2018 12:57:13.570:WARN [web-server]: 404: /base/node_modules/rally-sdk2-test-utils/src/sdk/2.1/rui/resources/css/rui-Chrome 65.0.3325 (Mac OS X 10.11.6) Rally.example.test.Crud should create a defect FAILED
	Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
Chrome 65.0.3325 (Mac OS X 10.11.6): Executed 1 of 5 (1 FAILED) (0 secs / 0 secs)

When ran over the grunt test

./node_modules/.bin/grunt test
Running "jshint:all" (jshint) task
>> 1 file lint free.

Running "jasmine:app" (jasmine) task
Testing jasmine specs via PhantomJS

 Rally.example.test.Crud
   ✓ should create a defect
   ✓ should read the defect
   ✓ should update the defect
   when deleting the defect
     ✓ should handle success
     ✓ should handle error

5 specs in 0.82s.
>> 0 failures

Here is the karma.conf

module.exports = function(config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine'],
    files: [
      'node_modules/rally-sdk2-test-utils/src/sdk/2.1/sdk-debug.js',
      'node_modules/rally-sdk2-test-utils/dist/sdk2-test-utils.js',
      '*.js',
      'test/*.js',
    ],
    browsers: ['Chrome'],
    singleRun: true,
    reporters: ['progress', 'coverage'],
    preprocessors: {'*.js': ['coverage']},
    client: {
      jasmine: {
        template: 'node_modules/rally-sdk2-test-utils/lib/specs.tmpl',
      },
    },
  });
};

This generates coverage to some extent, but the tests are not passing

screen shot 2018-04-28 at 1 04 18 pm

What do you think I am missing? Please help?

from rally-app-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.