Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

result not getting posted on RP #50

Open
vaibhavshukl12 opened this issue Aug 23, 2020 · 25 comments
Open

result not getting posted on RP #50

vaibhavshukl12 opened this issue Aug 23, 2020 · 25 comments

Comments

@vaibhavshukl12
Copy link

my config.js
const ReportportalAgent = require('agent-js-jasmine'); const agent = new ReportportalAgent({ token: "8736a402-8d39-46ac-99d9-*", endpoint: "http://.com", launch: "protractortest", project: "unified-qa", attachPicturesToLogs: false, }); exports.config = { capabilities: { 'browserName': 'chrome' }, seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['rpspec.js'], onPrepare: ()=> { jasmine.getEnv().addReporter(agent.getJasmineReporter()); }, afterLaunch:() => { return agent.getExitPromise(); } };

and my spec file

describe('second spec', function() { // Test in Jasmine it('second specopening home page', function() { browser.get('https://angular.io/') expect('true').toBe('true'); console.log('--------------------all----------') }); });

protractor log:

`D:\AutomationPOC\proptractor\protractor_rp> protractor .\config.js
(node:5680) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[00:13:07] I/launcher - Running 1 instances of WebDriver
[00:13:07] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
Started
--------------------all----------.
1 spec, 0 failures
Finished in 8.947 seconds

[00:13:18] I/launcher - 0 instance(s) of WebDriver still running
[00:13:18] I/launcher - chrome reportportal/reportportal#1 passed
PS D:\AutomationPOC\proptractor\protractor_rp>`

@vaibhavshukl12
Copy link
Author

Hi, @DzmitryHumianiuk Hope you are doing well.
Please help with this.

@DzmitryHumianiuk
Copy link
Member

@AmsterGet can assist here.

@vaibhavshukl12
Copy link
Author

Hi, @AmsterGet please help with this.

@vaibhavshukl12
Copy link
Author

Hi, @AmsterGet and@KatsiarynaTatarynovich Please help on this.

@AmsterGet
Copy link
Member

Hi @vaibhavshukl12 !
Have you tried an example from our examples repository?

@vaibhavshukl12
Copy link
Author

@AmsterGet yes I cloned the same example also but no result is posting.
I change the configuration like token, endpoint and project only
But nothing turned on

@AmsterGet
Copy link
Member

Any other logs from the console?

@vaibhavshukl12
Copy link
Author

vaibhavshukl12 commented Aug 25, 2020

No @AmsterGet as my script is passing I am not getting any failed log.
I followed the below process please let me know if anything I missed.
1- Ran this command - npm i @reportportal/agent-js-jasmine --save-dev
2- added this code in conf.js file

var ReportportalAgent = require('@reportportal/agent-js-jasmine');`
var agent = new ReportportalAgent({
    // client settings
    token: "00000000-0000-0000-0000-000000000000",
    endpoint: "http://your.reportportal.server/api/v1",
    launch: "LAUNCH_NAME",
    project: "PROJECT_NAME",
    // agent settings
    attachPicturesToLogs: true,
    attributes: [
        {
            "key": "YourKey",
            "value": "YourValue"
        },
        {
            "value": "YourValue"
        },
    ]
});

3- added this in onPrepare- jasmine.addReporter(agent.getJasmineReporter());
4- added this in conf file -

agent.getExitPromise().then(() => {
    console.log('finish work');
})

Anything else i need to do

@vaibhavshukl12
Copy link
Author

Hi @AmsterGet, Please help on this.

@vaibhavshukl12
Copy link
Author

Hi @AmsterGet below is version:
"devDependencies": {
"@reportportal/agent-js-jasmine": "^5.0.0",
"jasmine": "^3.2.0"
}

@vaibhavshukl12
Copy link
Author

vaibhavshukl12 commented Aug 31, 2020

Hi @KatsiarynaTatarynovich
RP Version is 5.3
and other is

"devDependencies": {
"@reportportal/agent-js-jasmine": "^5.0.0",
"jasmine": "^3.2.0"
}

@KatsiarynaTatarynovich
Copy link
Contributor

@vaibhavshukl12 two minutes ago I ran the example from our examples repository and the results are displayed in RP. Are you sure you entered the data correctly? Please send me an endpoint value. And recheck the token value.

@vaibhavshukl12
Copy link
Author

Thanks, @KatsiarynaTatarynovich for your support it's working now, I created a new project then it's working fine.
But now I have one more issue. I have one describe block in which I have three it blocks, but on RP @test is created inside @test and launch is the in-progress mode it's not stopping also please help on this

@vaibhavshukl12
Copy link
Author

vaibhavshukl12 commented Sep 1, 2020

Hi @KatsiarynaTatarynovich it's working with one it block in describe but when I am putting multiple it in single describe then issue is coming launch is also not stopping and it is coming inside it.
Please look into this.

@vaibhavshukl12
Copy link
Author

Hi, @KatsiarynaTatarynovich Hope you doing well.
Please update on this.

@vaibhavshukl12
Copy link
Author

Hi @KatsiarynaTatarynovich and @AmsterGet I try to run in debug mode also.
But the Finish launch is not happening.
The launch is in running mode until i am forcibly stopped it.

Start launch 3btx73gkelh38s3
[19:55:29] I/launcher - Running 1 instances of WebDriver
[19:55:29] I/direct - Using ChromeDriver directly...

DevTools listening on ws://127.0.0.1:57700/devtools/browser/b440497e-8d13-4a04-b93a-69bd512d1a2c
XML report directory cleared!
Spec started
Start test item 3btx73gkelh3h67
Hi 2

Flipkart Launch Demo Script
✓ Demo1
Hi 2
✓ Demo2

Executed 2 of 2 specs SUCCESS in 0.359 sec.
Success start item 3btx73gkelh3h67
Start test item 3btx73gkelh3h69
Start test item 3btx73gkelh3hfn
[19:55:40] I/launcher - 0 instance(s) of WebDriver still running
[19:55:40] I/launcher - chrome reportportal/reportportal#1 passed
Success start item 3btx73gkelh3h69
Save log 3btx73gkelh3hfm
Success start item 3btx73gkelh3hfn
Finish test item 3btx73gkelh3hfn
Save log 3btx73gkelh3hnd
Successfully save log 3btx73gkelh3hfm
Finish test item 3btx73gkelh3h69
Success finish item 3btx73gkelh3hfn
Success finish item 3btx73gkelh3h69
Successfully save log 3btx73gkelh3hnd
Finish test item 3btx73gkelh3hfn
Success finish item 3btx73gkelh3hfn

Please help on this .

@KatsiarynaTatarynovich
Copy link
Contributor

KatsiarynaTatarynovich commented Sep 2, 2020

@vaibhavshukl12 Put return agent.getExitPromise(); inside of the afterLaunch method in the config (like in the example)

afterLaunch() {
        return agent.getExitPromise();
    }

@vaibhavshukl12
Copy link
Author

vaibhavshukl12 commented Sep 2, 2020

@KatsiarynaTatarynovich I already put this method but still launch is not finishing.
Please have a look at the conf file that I am using.
And pls help on this.

var q = require('./node_modules/q');
const ReportportalAgent = require('@reportportal/agent-js-jasmine');

const agent = new ReportportalAgent({
  // client settings
  token: "",
  endpoint: "",
  launch: "",
  project: "",
  debug: true,
  attachPicturesToLogs: true,
});
exports.config = {
  allScriptsTimeout: 160000,
  getPageTimeout: 190000,

  specs: [
   
    'specs/demo_spec.js',
  ],

  capabilities: {
    browserName : 'chrome',
    marionette : true,
    acceptInsecureCerts : true
  },
  directConnect: true,
  framework: 'jasmine2',
  onPrepare: function () {
    jasmine.getEnv().addReporter(agent.getJasmineReporter());
    },
  afterLaunch() {
    return agent.getExitPromise();
}

};

@KatsiarynaTatarynovich
Copy link
Contributor

@vaibhavshukl12 Please try this configuration multiTread

@vaibhavshukl12
Copy link
Author

@KatsiarynaTatarynovich I tried both, but the issue persists.
I am using Grunt as task runner is there any issue with this for RP

@KatsiarynaTatarynovich
Copy link
Contributor

KatsiarynaTatarynovich commented Sep 2, 2020

@vaibhavshukl12 You can try this solution #82 Hope it will help you

@vaibhavshukl12
Copy link
Author

@KatsiarynaTatarynovich i tried the above solution but still launch is in running mode only.

@tr1ble
Copy link
Contributor

tr1ble commented Aug 8, 2022

@KatsiarynaTatarynovich i tried the above solution but still launch is in running mode only.

Is problem still actual ? @vaibhavshukl12

@DzmitryHumianiuk
Copy link
Member

@AmsterGet ^?

@AmsterGet
Copy link
Member

Hello @vaibhavshukl12 !
Did you manage to solve the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants