title: Create test data in a fixture
body: <p>Currently, I am working on a project which we have to create users and do tests for those users. I am using <code>faker</code> to generate user first name, last name and other data. I want to create a user with those details and save them in a variable and then call in the tests using them.</p>
  <p>I have tried many methods like calling them from a function, calling from another test and I failed to pass created data to another test.</p>
  <p>Create user<br></p>
  <pre><code>fixture &quot;Create test data and pass them to the other tests&quot;
    .page('url')
    .beforeEach(async (t) =&gt; {
      await t
        .typeText(&quot;#txtUserName&quot;, 'username')
        .typeText(&quot;#txtPassword&quot;, 'password')
        .click(&quot;#btnLogin&quot;);
    });
  
  test(&quot;Create test data for add family tests&quot;, async (t) =&gt; {
    await add_bulk_action_page.clickBulkActionButton();
    await add_bulk_action_page.clickAddFamilyButton();
    await add_family_page.selectCentre(&lt;string&gt;userVariables.defaultCentreName);
    var guardianFirstName = await add_family_page.typeGuardianFirstName(
      await getFirstName()
    );
    var guardianLastName = await add_family_page.typeGuardianLastName(
      await getLastName()
    );
  
    await add_family_page.clickAddFamilyButton();
  });
  </code></pre>
  <p>Call in this test in the same file</p>
  <pre><code>test(&quot;Access created test data&quot;, async (t) =&gt; {
      await family_list_page.typeSearchText(guardianFirstName);
      await family_list_page.typeSearchText(guardianLastName);
  });
  </code></pre>
  <p>I cannot give more than these code segments. I am sorry! Hope this is clear.</p>
  <p>Data driven tests are not convenient in this matter because we are creating so much of users.</p>
  <p>Please help me</p>