Code Monkey home page Code Monkey logo

Comments (8)

Almouro avatar Almouro commented on May 12, 2024 1

Very clear thanks!

I've just noticed that in the script you passed , there's a duration of 100000 set.
It might not be entirely clear but that means that each iteration will measure for 100000ms, so 100s, even if the test has succeeded. In your case, if the test succeeds in 36s, it should wait for ~60s additional seconds before jumping on the second iteration.

What happens if you wait for a minute or so, or just not pass any duration parameter?

from flashlight.

juannavalonribas avatar juannavalonribas commented on May 12, 2024 1

It works with this simple example

describe(`Performance in ${country.countryCode}`, () => {
  beforeEach(async () => {
    await checkAppStatus();
  });
  it('Just Click in login button', async () => {
    await HomeScreen.goToLogin();
    await new Promise(resolve => setTimeout(resolve, 5000));
  });
});

appium capabilities:

        'appium:noReset': false,
        'appium:fullReset': false,

I am going to investigate what might be happening. The previous case I had tried it with a suite that only contains 1 test.

from flashlight.

Almouro avatar Almouro commented on May 12, 2024 1

@juannavalonribas Up to my knowledge, Browserstack sadly doesn't allow adb access so this lib won't work (https://github.com/bamlab/android-performance-profiler#running-in-ci for more details)

from flashlight.

Almouro avatar Almouro commented on May 12, 2024

Hi @juannavalonribas, thanks for the congratulations! 😊

A few questions on my side:

  • what e2e framework are you using? what does yarn e2e:android:local:fr run?
  • can you share a copy of the logs you see in the terminal when running npx @perf-profiler/e2e measure ...?
  • what OS are you running on?

from flashlight.

juannavalonribas avatar juannavalonribas commented on May 12, 2024

Hello @Almouro,

I am using appium@next (appium 2) with webdriverIO all in javascript. The command I am launching is "e2e:android:local:fr": "TEST_COUNTRY='FR' TEST_ENV=E2E yarn e2e:android:local --suite login",
Where e2e:android:local = "e2e:android:local": "TEST_ENV=E2E wdio ./e2e/config/wdio.android.local.conf.js",

Logs:
[16:59:28] ℹī¸ Installing C++ profiler for arm64-v8a architecture [16:59:28] ✅ C++ Profiler installed in /data/local/tmp/BAMPerfProfiler [16:59:29] ℹī¸ Running iteration 1/10
And then the test is executed properly and ends showing:
Spec Files: 1 passed, 1 total (100% completed) in 00:00:33 ✨ Done in 36.05s.
But the "process" is still running with no more iterations

Running the command locally in a macbook m1 macOs Ventura 13.0.1 through webstorm terminal

from flashlight.

juannavalonribas avatar juannavalonribas commented on May 12, 2024

ohh It was a missunderstanding.. true is working properly. But I have another question currently the json results.json report appears empty regarding the current json https://gist.github.com/juannavalonribas/35d53300e408d9d482876348443ab314

Any idea?

from flashlight.

Almouro avatar Almouro commented on May 12, 2024

Oh that's not normal indeed

I've tried quickly with a small wdio example and cannot reproduce this.
Would you be able to reproduce this with a very simple test on your app? Something like:

describe("Very simple test", () => {
  it("finds the text", async () => {
    const text = "random text";
    const element = await $(
      `//*[contains(@text,'${text}')] |`
    );
    await element.waitForDisplayed({ timeout: 30000 });
    // Just wait for 5s to make sure we have performance measures before the app stops
    await new Promise((resolve) => setTimeout(resolve, 5000));
  });
});

Also is the app stopping and starting during the e2e test? We expect the test to start the app and never stop it (except at the end potentially)

from flashlight.

juannavalonribas avatar juannavalonribas commented on May 12, 2024

Hello!

I have tried using my real device connected in local env and it works perfect. Now im facing the challenge launching the test against browserstack.

I close this "doubt" cause has been resolved.
Thanks

from flashlight.

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.