Protractor, how do you run one test case?

I use protractor 1.8.0 and jasmine 2.1.3, but I cannot run one test when I use ddescribe and then iit. I get:

Message: ReferenceError: iit is not defined

I have many test cases and I want to just run 1 for debugging purposes. Is there any way to do this?

Do I need to install jasmine-focused with $ npm or is it already part of jasmine 2.1.3?

@Aaron I went ahead, uninstalled and reinstalled. Passed the test and received the same error. Here is the result after installation.

/usr/local/bin/protractor -> /usr/local/lib/node_modules/protractor/bin/protractor
/usr/local/bin/webdriver-manager -> /usr/local/lib/node_modules/protractor/bin/webdriver-manager
protractor@1.8.0 /usr/local/lib/node_modules/protractor
├── jasminewd@1.1.0
├── jasminewd2@0.0.2
├── saucelabs@0.1.1
├── html-entities@1.1.2
├── q@1.0.0
├── minijasminenode@1.1.1
├── adm-zip@0.4.4
├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10)
├── glob@3.2.11 (inherits@2.0.1, minimatch@0.3.0)
├── accessibility-developer-tools@2.6.0
├── source-map-support@0.2.9 (source-map@0.1.32)
├── lodash@2.4.1
├── request@2.36.0 (json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, qs@0.6.6, oauth-sign@0.3.0, tunnel-agent@0.4.0, mime@1.2.11, node-uuid@1.4.3, http-signature@0.10.1, form-data@0.1.4, tough-cookie@0.12.1, hawk@1.0.0)
├── jasmine@2.1.1 (jasmine-core@2.1.3)
└── selenium-webdriver@2.44.0 (tmp@0.0.24, xml2js@0.4.4)
+4
source share
2 answers

Syntax for version 2.1: fdescribeand fit. Source

describe('a test', function() {
    it('spec 1', function() {
        console.log('1');
    });

    it('spec 2', function() {
        console.log('2');
    });

    it('spec 3', function() {
        console.log('3');
    });
});

This will print:

1
.2
.3
.

Topics:

fdescribe('a test', function() {
    it('spec 1', function() {
        console.log('1');
    });

    fit('spec 2', function() {
        console.log('2');
    });

    it('spec 3', function() {
       console.log('3');
    });
});

It will be printed:

2
.
+4
source

@ , . . - :

/*var jasmineReporters = require('jasmine-reporters'); jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({ consolidateAll: true, filePrefix: 'verifi_portal_tests_xmloutput', savePath: './test_results_report' }));*/

, . , - - fdescribe .

UPDATE: - - 2.0.4 2.0.5. .

-1

All Articles