Giter Club home page Giter Club logo

Comments (32)

sbunyard78 avatar sbunyard78 commented on July 19, 2024 8

@vinhpnguyen, I think its luckily worked for you(Sometime katalon generates different timestamps). But the actual issue is not fixed. Reports are still getting overwritten.

It's a relief that I'm not the only one experiencing this issue. Glad to see it's been reopened

from katalon-studio.

sunilaadike avatar sunilaadike commented on July 19, 2024 2

@sseypt To solve this, instead of exclusive copy statement from the script. You can just directly map the ${project_dir}/Reports directory to some directory on the host, as ${project_dir}/Reports path is fixed.

$ docker run -v /home/ubuntu/report:/katalon/katalon/project/Reports -v /home/ubuntu/katalon-test/automation-code:/katalon/katalon/source -e KATALON_OPTS="$katalon_opts" katalon-katalon

from katalon-studio.

surajchandegave avatar surajchandegave commented on July 19, 2024 2

@vinhpnguyen, I think its luckily worked for you(Sometime katalon generates different timestamps). But the actual issue is not fixed. Reports are still getting overwritten.

from katalon-studio.

JICJ avatar JICJ commented on July 19, 2024 2

when running testsuits by command line ,reports are getting overwritten while having the same timestamp Is it comfirmed a bug ? and does you have any solutions ?@devalex88

from katalon-studio.

isurunix avatar isurunix commented on July 19, 2024 2

I'm facing the same issue on the standalone version in console mode. Any idea when this is going to be fixed?

from katalon-studio.

jchatronLetsignit avatar jchatronLetsignit commented on July 19, 2024 1

By the way i'm using this personal workaround for the moment (a custom Listner) :

@AfterTestSuite
def printInfo(TestSuiteContext testSuiteContext) {


    String mainReportFolder = "#pathYouWant"
    if (!(new File(mainReportFolder).exists())) {
        new File(mainReportFolder).mkdirs()
    }
    FileUtils.copyDirectoryToDirectory(new File(RunConfiguration.reportFolder),  new File(mainReportFolder))

from katalon-studio.

antho49 avatar antho49 commented on July 19, 2024 1

@vinhpnguyen and @devalex88, do you plan an image delivery soon to fix this issue ?

from katalon-studio.

vinhpnguyen avatar vinhpnguyen commented on July 19, 2024

From your provided logs, I can see that the reports are generated in different folders having the same timestamp. Please help to double check them again once again from your side.

from katalon-studio.

surajchandegave avatar surajchandegave commented on July 19, 2024

+1. I am also facing same issues. On a mapped directory(-v /home/ubuntu/report:/katalon/katalon/report), it is directly creating the timestamp directories which is causing the overwrite not unlike in studio it generates first test suite directory and under that it creates timestamp directory.

from katalon-studio.

sunilaadike avatar sunilaadike commented on July 19, 2024

@vinhpnguyen
No its not creating timestamp folders under suite name folders, All the timestamp folders are getting created under parent folder (/home/ubuntu/report) and as the timestamps are same for some suites, their reports are getting overwritten.

This is a confirmed bug and there also some questions on this container in the Katalon forums:
https://forum.katalon.com/discussion/comment/23010

from katalon-studio.

sunilaadike avatar sunilaadike commented on July 19, 2024

@longngbui @vinhpnguyen Any update on this ?

from katalon-studio.

incoming-th avatar incoming-th commented on July 19, 2024

My 2 cents, this seems to be easily changed in the .sh your are calling.

Ex in run_firefox.sh

reports_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )/reports/firefox"

Just add the timestamp there and it will be fine. Personally no issue with this default dir as I upload all reports in AWS after completion.

from katalon-studio.

sseypt avatar sseypt commented on July 19, 2024

Same here.
Wenn running collections with -reportFolder each test is writing its report into the same directory.

Workaround:

  • extend katalonstudio/katalon
  • override katalon-execute.sh

Dockerfile:

FROM katalonstudio/katalon

COPY katalon-execute.sh  $KATALON_KATALON_ROOT_DIR/scripts/katalon-execute.sh

RUN $KATALON_MAKE_EXECUTABLE_SCRIPT $KATALON_KATALON_ROOT_DIR/scripts/.

katalon-execute.sh:

#!/usr/bin/env bash

set -xe

echo "Starting Katalon Studio"

current_dir=$(pwd)

# create tmp directory
tmp_dir=$KATALON_KATALON_ROOT_DIR/tmp
mkdir -p $tmp_dir
chmod -R 777 $tmp_dir

# project source code
project_dir=$KATALON_KATALON_ROOT_DIR/project
mkdir -p $project_dir
cp -r $KATALON_KATALON_ROOT_DIR/source/. $project_dir
# create .classpath if not exist
touch $project_dir/.classpath || exit
chmod -R 777 $project_dir

# report
report_dir=$KATALON_KATALON_ROOT_DIR/report
mkdir -p $report_dir

# build command line
project_file=$(find $project_dir -maxdepth 1 -type f -name "*.prj")
cmd="$KATALON_KATALON_INSTALL_DIR/katalon -runMode=console -projectPath=$project_file $KATALON_OPTS"

$KATALON_BASE_ROOT_DIR/scripts/xvfb.sh start
cd $tmp_dir
eval "$cmd"

# avoid bug with the reportFolder option: overriding reports using test suit collection
# https://forum.katalon.com/discussion/7051/why-lose-some-suite-report-when-execute-suite-collection-in-console-mode
# https://github.com/katalon-studio/docker-images/issues/26
cp -r ${project_dir}/Reports/. ${report_dir}

chmod -R 777 $report_dir

cd $current_dir

http://www.mergely.com/RRpuhyNW/

from katalon-studio.

sunilaadike avatar sunilaadike commented on July 19, 2024

@sseypt Yes .. even we followed the same approach. But maintaining this image separately is an overhead.

Now as we know that this a valid and critical bug and the fix being simple not sure why its not being fixed here.

from katalon-studio.

sseypt avatar sseypt commented on July 19, 2024

@sunilaadike This might need a bit more refactoring. I'm now facing another problem. eval will exit 1 if the collection has any failed test. Because of that cp -r is not executed.. still no reports :)

from katalon-studio.

vinhpnguyen avatar vinhpnguyen commented on July 19, 2024

Hi all,

I've tried with the latest docker version and observe that generated reports from Test Suite Collection are not overwritten. It does generate new folders after each execution. Here is my used command:
docker run -t --rm -v "$(pwd)":/katalon/katalon/source katalonstudio/katalon katalon-execute.sh -browserType="Chrome" -retry=0 -statusDelay=15 -testSuiteCollectionPath="Test Suites/Login Test Suite collection"

Results:
screen shot 2018-11-20 at 17 03 01

So it's fixed. Please try again using the latest docker version.

from katalon-studio.

sbunyard78 avatar sbunyard78 commented on July 19, 2024

Hi. I've tried the solution suggested by @vinhpnguyen above but I'm still getting all of the reports overwriting in the same folder. I'm on the most up to date version of the docker image as well.

Is this anything to do with me running locally on a Mac? My experience level on this kind of thing is very low, I'm very new to it all!

from katalon-studio.

jchatronLetsignit avatar jchatronLetsignit commented on July 19, 2024

Same here would be nice to at least be able to pass as an argument -reportFolder that can overwrite the one present in the script execute.sh

from katalon-studio.

sbunyard78 avatar sbunyard78 commented on July 19, 2024

By the way i'm using this personal workaround for the moment (a custom Listner) :

@AfterTestSuite
def printInfo(TestSuiteContext testSuiteContext) {


    String mainReportFolder = "#pathYouWant"
    if (!(new File(mainReportFolder).exists())) {
        new File(mainReportFolder).mkdirs()
    }
    FileUtils.copyDirectoryToDirectory(new File(RunConfiguration.reportFolder),  new File(mainReportFolder))

Where do you enter this code please?

from katalon-studio.

jchatronLetsignit avatar jchatronLetsignit commented on July 19, 2024

Under the Folder Test Listeners you can create a new file which contains the Listners you want :)

from katalon-studio.

sbunyard78 avatar sbunyard78 commented on July 19, 2024

Under the Folder Test Listeners you can create a new file which contains the Listners you want :)

Great, thanks very much, I'll have a look

from katalon-studio.

jchatronLetsignit avatar jchatronLetsignit commented on July 19, 2024

it seems to work BUT since it's in a listener it will copy the report folder without the html ... since it seems that Katalon is producing this after the call of Listeners sadly ... waiting for an official fix of this ...

from katalon-studio.

sbunyard78 avatar sbunyard78 commented on July 19, 2024

Ah not ideal, but worth a try as a get around for now, thank you very much.

I'd try sseypt's suggestion above from Oct 16 but, again, not sure where to enter this code

from katalon-studio.

jchatronLetsignit avatar jchatronLetsignit commented on July 19, 2024

by the way since we are speaking of reports with this docker image, do you guys have the classical two html files in the folder ? usually Katalon produce a report.html AND a 20181218_153420.html (from the 20181218_153420.csv file) it seems that with the docker image i only have the report.html (which contains less informations)

from katalon-studio.

pavelvoronin avatar pavelvoronin commented on July 19, 2024

Same here would be nice to at least be able to pass as an argument -reportFolder that can overwrite the one present in the script execute.sh
Yes, we need to modify https://github.com/katalon-studio/docker-images/blob/5deae62b9257a3b28967f6780fe0527f4641d6f4/katalon/src/scripts/katalon-execute.sh#L40-L44

delete this line -> report_dir=$KATALON_KATALON_ROOT_DIR/report
Check if env $report_dir exist using env, if not exist set default report folder and create it. Now i cant get login of existing script
if ! [ -z "$report_dir" ]; then
report_dir=$source_dir/report
fi
mkdir -p $report_dir

docker run -t --rm --env DISPLAY_CONFIGURATION="1920x1080x24" --env report_dir=/katalon/katalon/source/katalon-ui-test/report/BVT/ katalonstudio/katalon:latest katalon-execute.sh bla bla ...

from katalon-studio.

devalex88 avatar devalex88 commented on July 19, 2024

I've moved this issue to https://github.com/katalon-studio/katalon-studio for planning.

from katalon-studio.

JICJ avatar JICJ commented on July 19, 2024

can we rename the reportFolder @devalex88

from katalon-studio.

jchatronLetsignit avatar jchatronLetsignit commented on July 19, 2024

So the docker image can't fix this ? we have to wait for the katalon main project to fix it ?

from katalon-studio.

jchatronLetsignit avatar jchatronLetsignit commented on July 19, 2024

Any update on this ?

from katalon-studio.

jeroengijsman avatar jeroengijsman commented on July 19, 2024

also having this issue, i just created a new issue in the docker repo katalon-studio/docker-images#46.

from katalon-studio.

devalex88 avatar devalex88 commented on July 19, 2024

Thank you for your report. Please follow #19. This issue has been planned to be fixed in 6.1.0.

from katalon-studio.

jchatronLetsignit avatar jchatronLetsignit commented on July 19, 2024

Nice thanks for your work !

from katalon-studio.

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.