testingprotractorautomated-testsangularjs-e2ee2e-testing

No specs found when looping tests on Protractor


I'm using Protractor on Selenium, MacOS and Chrome. I'm trying to run the same test using an array of elements to provide the test data:

As I read here: Looping on a protractor test with parameters

I was trying that solution but when I run it, my test is not even found:

 for(var i = 0; casos.length; i++){

            (function(cotizacion){
                it('obtener $1,230.00 de la cotizacion', function(){
                    browser.get('https://mifel-danielarias.c9users.io');
                    login(user,pass);
                    fillVidaCotizadorForm(formData);
                    //browser.sleep(5000);
                    var primaTotal = element(by.binding('vida.primaTotal'));
                    browser.wait(EC.visibilityOf(primaTotal),4000);
                    expect(primaTotal.getText()).toBe(cotizacion);
                });
            })(casos[i].Fallecimiento);
        }

Output message:

> [14:13:01] I/hosted - Using the selenium server at
> http://localhost:4444/wd/hub [14:13:01] I/launcher - Running 1
> instances of WebDriver Started
> 
> 
> No specs found Finished in 0.003 seconds

This loop is inside my describe function and if I run the test normally without any loop, it runs flawlessly.


Solution

  • As @OptimWorks mentioned in his comment, Data Driven Approach was exactly what I was looking for, and this question provided several good answers.