Hello,
I am badly looking for a solution to this.
Scenario: When a tester look in to the NeoLoad report, the tester should see an information on which application build the current test has run.
More details: The NeoLoad report we get after the result , I am looking to see an information on which particular application build the test has ran.
At my application end, I can get this information by hitting on a REST API request and I can see the application build info in its response content.
I have added the same REST API in my userpath, and I can extract the details I want, to a variable. But do not know how can I embedd this variable information in the report, so that any user who analyze the report will get to know where the performance testing has happened. Just showing the test env name (like pre-production ) might not help, in pre-production itself I might have deployed different builds and executed the tests multiple times.
What all I tried:
I see 'Execution context' link in the report, which can give all the 'Constant variables' that being configured to the project.
Right now 'Test Environment' is being shown with this
I tried extracting the application build info from my REST API request and saved in to one of the constant variable by setting in to the context.
ex: context.variableManager.setValue("Application_CI_Build",continuousIntegrationBuild);
In this case, when the Constant variable is shown in the report, it do not shows the value that being extracted from the response, it simply shows blank.
I also tried using JavaScript variable, but no outcome
I think my approaches are not good
Is there any better approach here to modify the report with this custom dynamic value..
Please let me know
Thanks,
Musaffir
My only suggestion would be to have 2 Neoload build actions, the first is small and light and just calls the api to get the true build number, this could be written out to a file or an environment variable with some Neoload Java script. You could then pass this build number into the second Neoload build action as the result name?
Why can't you manually add that build number in the test description before starting it? Don't you know in advance the build number of the application?
Even if you run your test through command line you can also change that test description to include your build number.
Thanks Nouredine for responding.
In my case, the test is more of like automated one.
I am not manually running the test
It is scheduled from Jenkins CI
Also manually adding the build number in the test description, looks like , the tester will have that additional job.
As i said we have a REST API which returns us the app build number and other details
I can get the info in the response in neolod..
Rite now i am showing it in the results log using JAVA Script logging...but it require Tool to be opened...not very easy for a user of my suite...
So thinking, how can i show it in the report...so user can see in Jenkins report itself...
Thanks
Jenkins creates a build number when the job executes, this build number can be passed in via the Neoload build action so that the build number can be included in teh name of teh result, the descriptions, etc. Is the build number of the application different from the Jenkins build number?
Yes Neil, the jenkins build no and app build versions do not have any relation..
The test result name itself, I am forming it with a reference of having Jenkins build number.
This don't help me actually.
Jenkins being used only to run the NeoLoad perf tests
It do not have any link to the actaul web app which is under test.
Actual web app is being build/deployed etc with Bamboo
And test from Jenkins is kind of isolated with the app building.
We use jenkins for scheduling the performance testing / also if any one want to manually kick of the test from Jenkins UI portal...
So that approach seems not useful...
If i can customize the report with a value from one of my request in the user path... thhat will do my job...As i said i can get app build info by hitting on a REST API that we have
Warm Regards
Musaffir
Neil was pointing me to the right direction.
Updating this thread with the steps that I have done to solve my situation, could be useful to any future readers.
1.I created a small light weight userpath/scenario in NeoLoad
2.This scenario hit on my application env api and fetch the env details
3.I extract the env details from its response and save to a file using js library.. the file is saved as a property file with key value pair
4.This gets saved to the projects workspace and hence available in Jenkins too
6.Jenkins execute this small scenario using windows batch command and Neoloads commandline
5.For every execution, this part of the work space will be deleted by Jenkins ..so we will have appropriate info added
6.I use Jenkins env injector plugin and inject the content from file as environment variables to job build
7.I add another windows batch command and run the actual scenario which i want to run
8.For this actual scenario i pass -description commandline argumnets and dynamically insert the env info from previous
9.Only thing to make sure is both are running in same env
10.Also i may not be interested to generate report etc for my light weight scanrio, but only for actual scenario
Thans to Neil for inuputs :)