Allure Test report : - allure

Unable to generate Allure report with the following configurations in the project, kindly let us whether additional dependencies are required.
Project Details
Cucumber framework
Gradle Build
Junit runner
Build.gradle script
buildscript
{
repositories
{
jcenter()
}
dependencies
{
classpath 'io.qameta.allure:allure-gradle:2.5'
}
}
apply plugin: 'io.qameta.allure'
allure
{
version = '2.6.0'
autoconfigure = true
}
dependencies
{
compile group: 'ru.yandex.qatools.allure', name: 'allure-cucumber-jvm-adaptor', version: '1.2'
}

I was having the same issue, try opening it in Firefox or failing that using the allure open command in allure cli.
allure open <path to file>

Related

Android build failures happening since 4th Nov 2022[FIX INSIDE]

The build error looks something like this:
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'My Project'.
Could not determine the dependencies of null.
Could not resolve all task dependencies for configuration ':classpath'.
Could not resolve com.facebook.react:react-native:+.
Required by:
project :
No matching variant of com.facebook.react:react-native:0.71.0-rc.0 was found.
The consumer was configured to find a runtime of a library compatible with Java 11,
packaged as a jar, and its dependencies declared externally, as well
as attribute 'org.gradle.plugin.api-version' with value '7.3.3'
update this below content in project level build.gradle:
allprojects {
repositories {
exclusiveContent {
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
// ...
}
}
it's working for me
FIX INSIDE
Steps to resolve the react-native issue that we are facing since couple of days.
Goto package.json and upgrade the react-native version to 0.64.4.(or whatever the supported version we have on the GitHub thread)
Run yarn install.
Now cd android
./gradlew clean
cd ..
yarn android (now your project will execute properly)
Note: This issue occurred because of the new release of the react native(4th nov), here I'm attaching the link for the reference.
URL : https://github.com/facebook/react-native/issues/35210
(if you face any issues do let me know i'll help you in resolving the same.)
This fix works:
Reason for Failures : The build failures for Android was due to the publish of the React Native version 0.71.0-rc0 to Maven and because of which when the gradle is syncing its picking this 0.71.0-rc0 version of react-native rather then your current version of react-native.
Made it work without upgrading react-native version and by adding this in build.gradle, this works (hermes enabled or not, along with flipper too)
exclusiveContent {
// We get React Native's Android binaries exclusively through npm,
// from a local Maven repo inside node_modules/react-native/.
// (The use of exclusiveContent prevents looking elsewhere like Maven Central
// and potentially getting a wrong version.)
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
final snippet looks like this
allprojects {
repositories {
exclusiveContent {
// We get React Native's Android binaries exclusively through npm,
// from a local Maven repo inside node_modules/react-native/.
// (The use of exclusiveContent prevents looking elsewhere like Maven Central
// and potentially getting a wrong version.)
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
gradle clean and rebuild after this fix. Then you can react native run android successfully.
What this fix will do is apply an exclusiveContent resolution rule that will force the resolution of React Native Android library, to use the one inside node_modules
If you dont want to put this fix, you can update your react native version for the project to the react native patch version as mentioned here
https://github.com/facebook/react-native/issues/35210

Error while to integrating Jenkins and Sonarqube for analysing my Angular project

I'm trying to integrate Jenkins and Sonarqube. I'm using the Sonarqube-Scanner plugin in jenkins. When I build the job, I get the following errors:-
Failed to get Node.js version. No CSS files will be analyzed.
Failed to get Node.js version. No TypeScript files will be analyzed. You can exclude TypeScript files from analysis with 'sonar.exclusions' property.
Any idea as to why this happens? I tried running the same job with a simple NodeJs project and it works fine.
Any help would be greatly appreciated, Thanks!
To perform sonar scan on Angular Project, you need to install typescript first. So, we need nodejs >=8 and npm installed. Check this post on How to install nodejs and npm in Jenkins. and also, How to integrate sonarqube in Jenkins
Sample Pipeline:
pipeline {
agent any
tools {nodejs "node_v10"}
stages {
stage('Git Pull') {
steps {
echo 'Code Checkout'
}
}
stage('Install Typescript') {
steps {
sh 'npm install typescript'
}
}
stage('Code scan Sonarqube') {
steps {
script {
def scannerHome = tool 'sonarqube';
withSonarQubeEnv("sonarqube-container") {
sh """${tool("sonarqube")}/bin/sonar-scanner \
-Dsonar.projectKey=test-node-js \
-Dsonar.sources=. \
-Dsonar.projectName=test-node-js \
-Dsonar.projectVersion=1.0 """
}
}
}
}
}
Please change or include some other sonar analysis parameters if needed.
Visit to know more about how to analyse typescript code

React native Could not determine java version from '10'

I am having a hard time trying to configure my emulator with react native. I already have the emulator installed but can't properly run the statement: react-native run-android this is the error I keep getting. (p.s. there seems to be no solutions in the troubleshoot. I have tried to change the gradle-properties which was ineffective)
C:\Users\Dell\AwesomeProject>react-native run-android
Scanning folders for symlinks in C:\Users\Dell\AwesomeProject\node_modules (31ms)
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
FAILURE: Build failed with an exception.
What went wrong:
Could not determine java version from '10'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
I had the same issue. After upgrading to Ubuntu Bionic which comes with Java 10 which is not supported by react-native.
I'm using the following script now:
#!/bin/bash
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/
export PATH=$JAVA_HOME/bin:$PATH
react-native run-android
I change the env path to Java 8 and run the app.
You can try upgrading your gradle or downgrading java ... I would prefer upgrading your gradle.
Upgrading our Gradle
1 .Modify android/build.gradle :
Add google() inside repositories
buildscript {
repositories {
jcenter()
// add google() here
google()
Update com.android.tools.build.gradle to 3.1.0
buildscript {
repositories {
jcenter()
google()
}
dependencies {
// classpath 'com.android.tools.build:gradle:2.2.3'
// update from 2.2.3 to 3.1.0
classpath 'com.android.tools.build:gradle:3.1.0'
Add google() inside repositories after dependencies :
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
}
allprojects {
repositories {
mavenLocal()
jcenter()
// add googgle() here
google()
Add android.enableAapt2=false to android/gradle.properties
android.enableAapt2=false // < --- add here
android.useDeprecatedNdk=true
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
Update gradle version in android/gradle/wrapper/gradle-wrapper.properties :
// from version 2.14.1
distributionUrl=https://services.gradle.org/distributions/gradle-2.14.1-all.zip
// change to 4.4
distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip
Runreact-native run-android. (This might take a while since it’ll be downloading the updated gradle version.)

How to create registry for bitbucket source in jspm?

I am not familiar in jspm and its registry. I have a private source in bitbucket and I need to create a registry for this in jspm. I am using nodejs with gulp task runner in my source. I researched the jspm doc and there is no information for bitbucket.
I have used the below config in my package.json
"devDependencies": {
.....
"jspm": "^0.16.39",
"jspm-git": "^0.4.5"
}
"jspm": {
"registry": "jspm",
"name": "my-package",
"registries": {
"bitbucket": {
"baseurl": "git+ssh://git#bitbucket.org/",
"handler": "jspm-git"
}
}
}
Is it enough for creating a registry in jspm?
How to use bitbucket repository in jspm registry and how to install it?
Is there any doc or steps available in online?
Execute the command:
jspm registry create bitbucket jspm-git
When it asks for the url set the base one:
ssh://git#bitbucket.org
No need to set the advanced configurations. It will use the system ssh public key to authenticate with bitbucket.
To add your repository into the package.json simply add:
"new-component": "bitbucket:gguridi/repository#master",
Executing jspm install should retrieve the code.

Calculating Gradle Tasks.... java.lang.NullPointerException

I created a script in gradle. When I select Run -> External Tools -> External Tools Configurations -> Gradle build for Creating new build and its throwing error An error has occurred.
"See error log for more details.!java.lang.NullPointerException " its displayed in messagebox
After editing build.gradle file same error also displaying! "An internal error occurred during: "Calculating Gradle Tasks...".java.lang.NullPointerException"
apply plugin: 'java'
apply plugin: 'eclipse'
version = "1.0"
sourceCompatibility = 1.7
jar {
manifest {
attributes 'Implementation-Title': 'Gradle Quickstart', 'Implementation-Version':
version
}
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4.+'
}
}
repositories {
mavenCentral()
}
sourceSets {
unitTest {
java.srcDir file('src/test/java')
resources.srcDir file('src/test/resources')
}
}
task wrapper(type: Wrapper) {
description = 'Install Gradle wrapper'
gradleVersion = '1.10'
}
dependencies {
compile 'org.apache.poi:poi:3.9'
compile 'org.testng:testng:6.8.5'
compile 'org.seleniumhq.selenium:selenium-server:2.39.0'
compile 'org.seleniumhq.selenium:selenium-htmlunit-driver:2.42.2'
compile 'com.googlecode.json-simple:json-simple:1.1'
compile 'net.sf.json-lib:json-lib:2.4:jdk15'
compile 'log4j:log4j:1.2.17'
}
test {
useTestNG(){
options.suites("src/test/resources/testng.xml")
}
}
uploadArchives {
repositories {
flatDir {
dirs 'repos'
}
}
}
Anything i missed in configuration, anyone can help me?
I have created a Gradle project in Eclipse, and pasted your build.gradle contents into mine.
Your gradle script seems fine to me. I could:
- See Gradle tasks for the project in Gradle Tasks view
- Open Gradle
Build launcher configuration wizard via context menu on the project
explorer and via the Run External Tools
- Could launch Gradle tasks
All that with STS 3.6.0 M1 (latest Gradle Eclipse integration
Which STS are you using? Or which version of Gradle Eclipse integration?
What's the stack trace for the NPE?
Try upgrading your Gradle eclipse integration from this update site: http://dist.springsource.com/release/TOOLS/gradle If that still won't work try the latest, STS 3.6.0 RC1 update site and pick Gradle Eclipse Integration from there http://dist.springsource.com/milestone/TOOLS/update/3.6.0.RC1/e4.4 (replace e4.4 with your eclipse version, e.g. e4.3, e4.2, e3.8, e3.7)

Resources