Data-Driven Testing in Protractor
<p>I am new to protractor. Can anyone please guide me for data driven testing using protractor.  Below is the code, config file and testdata.json file.</p>

<pre><code>'use strict';

var testData = require('../example/Test Data/Test.json');

describe('LoginPage', function() {

var loginData = require('../example/Test Data/Test.json');

testData.forEach(function (data) {
    it("data.description", function (data) {
        browser.get("http://127.0.0.1:8080/#/login");
element(by.model("username")).sendKeys(data.username);
element(by.model("password")).sendKeys(data.passwordField); 
element(by.buttonText("Authenticate")).click();

});
});
});  
</code></pre>

<p>Config file:</p>

<pre><code> // An example configuration file.
exports.config = {
directConnect: true,

//seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'

},

// Framework to use. Jasmine is recommended.
framework: 'jasmine',

// Spec patterns are relative to the current working directory when
// protractor is called.
specs: ['Testpage.js'],

// Options to be passed to Jasmine.
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
</code></pre>

<p>Json File:</p>

<pre><code>[
{
 "username": "admin",
 "passwordField": "admin"
},

{
"username": "admin1",
"passwordField": "admin2"
}
]
</code></pre>

<p>Issue is that instead of taking data , it is writing undefined in all input boxes. Please Help</p>