Code Monkey home page Code Monkey logo

teamcity-plugin's Introduction

BrowserStack TeamCity Plugin

==============================

This plugin allows you to integrate your Selenium tests in TeamCity with BrowserStack Automate.

Features

  1. Setup and teardown BrowserStackLocal for testing internal,dev or staging environments.
  2. Embed BrowserStack Automate Reports as a new tab in Build results.
  3. Manage BrowserStack credentials in a central location for all your BrowserStack builds.

Prerequisites

  1. Minimum TeamCity version supported is v9+.
  2. Minimum Java version supported is JDK 6+.
  3. For viewing BrowserStack Automate report in your TeamCity test results:
  • Project must be a Java project.
  • Project must be built with Maven and use either TestNG or JUnit for testing.

Resources

About BrowserStack

BrowserStack is the industry’s most reliable cloud web and mobile testing platform, used by more than 2 million developers across 135 countries. We empower teams to speed up release cycles and deploy websites and mobile applications that work seamlessly on any user interface.

Users can choose from more than 1,200 on-demand real mobile devices, browsers and operating systems and rely on a secure, stable and scalable infrastructure to support thousands of concurrent manual and automated tests. By reducing the time, cost and maintenance overhead associated with testing, we help software teams keep focus on what matters most - building better products and services with amazing experiences.

More than 25,000 global companies rely on BrowserStack, including industry-leaders like Microsoft, ING, Mastercard, Dow Jones, Garmin, National Geographic, Volvo, NRK, HubSpot, Walt Disney and AngularJS, to name a few. With offices in San Francisco, Mumbai and Dublin, BrowserStack is privately held and backed by Accel. Learn more at: www.browserstack.com.

We’re hiring! View our open opportunities at: www.browserstack.com/careers.

Please email BrowserStack Support to report issues.

teamcity-plugin's People

Contributors

anirudha13 avatar ankurgel avatar bstack-security-github avatar francisf avatar mukulbstack avatar raghuhit avatar shirish87 avatar sinstein avatar tr4n2uil avatar vedharish avatar vikas17a avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teamcity-plugin's Issues

Out of memory error

Hi!

We're trying to use BrowserStackLocal plugin on TeamCity Enterprise 2017.1.5 and it raises "out of memory" error on TC agent:

[2017-11-29 06:01:47,175]   INFO - ges.RunnerFinishStagesExecutor - Call finish stage jetbrains.buildServer.agent.impl.buildStages.runnerStages.finish.FireRunnerFinishedFStage
[2017-11-29 06:12:29,575]   WARN - ildServer.util.EventDispatcher - Error in event handler: java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
        at java.io.UnixFileSystem.resolve(UnixFileSystem.java:108)
        at java.io.File.<init>(File.java:262)
        at java.io.File.listFiles(File.java:1212)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:739)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:748)
        at com.intellij.openapi.util.io.FileUtil.collectMatchedFiles(FileUtil.java:735)
        at com.browserstack.automate.ci.teamcity.BrowserStackLocalAgent.runnerFinished(BrowserStackLocalAgent.java:105)
        at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:121)
        at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:68)
        at com.sun.proxy.$Proxy6.runnerFinished(Unknown Source)
        at jetbrains.buildServer.agent.impl.buildStages.runnerStages.finish.FireRunnerFinishedFStage.doFinishStage(FireRunnerFinishedFStage.java:29)
        at jetbrains.buildServer.agent.impl.buildStages.RunnerFinishStagesExecutor.runFinishStage(RunnerFinishStagesExecutor.java:32)
        at jetbrains.buildServer.agent.impl.buildStages.RunnerFinishStagesExecutor.doBuildFinishStages(RunnerFinishStagesExecutor.java:23)
        at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.safeCallFinishStages(RunnerContextExecutor.java:65)
        at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:56)
[2017-11-29 06:12:29,584]   INFO - mpl$TeamCitySpringSubContainer - Closing SubContext: running build runner context id=15353685 runner 2 of 5: startup date [Wed Nov 29 06:00:44 EST 2017]; parent: SubContext: running build context id=15353685

Could you, please, investigate?

Tunnel gets blocked by AWS WAF

I've setup the BrowserStack TeamCity plugin in our Windows TeamCity Server (TCS) but the actual work is carried out by a Linux TeamCity Agent (TCA). Both of those machines are whitelisted in our AWS WAF (W) when accessing our staging environment (S).

When the automated Cucumber tests are running using that tunnel they constantly hit "403 Forbidden". However when I use a manually constructed tunnel (using code and the browserstack-local npm package) from the TCA machine (via SSH) all works fine and the S environment is accessible.

For now I've setup out TeamCity configurations to use the browserstack-local npm package specifically to access the S environment but the other environments are tested OK using the BrowserStack TeamCity plugin setup. These environments do NOT have any W rules against them.

This is an obscure scenario but I was able to isolate this to this plugin. Every other scenario works when accessing the S environment.

Builds hanging forever following a symlink

After installing the browserstack 2.0.0 plugin our builds hang indefinitely. (A build that used to take 2 minutes is still running after 20 hours)

We think it's related to this code:
https://github.com/browserstack/teamcity-plugin/blob/master/browserstack-teamcity-agent/src/main/java/com/browserstack/automate/ci/teamcity/BrowserStackLocalAgent.java#L109-L111

And may be related to this issue: #16

The builds that triggered this have a symlink that points to the parent directory, which seems to result in a state of infinite recursion when the plugin starts inspecting the directory. The build steps will finish, and then the build just hangs indefinitely with the Java process on the agent running at 100% CPU. Using strace on the java process shows it running stat on an ever expanding path like foo/bar/foo/bar/foo/bar/foo/bar...

A simple reproduction is a build like so:

#!/usr/bin/env bash
set -euo pipefail
set -x
ln -s . ./here
ln -s . ./here2
ls -al ./
ls -al here/
ls -al here2/
echo "Success!  But the agent will hang after this script successfully finishes."

Can this be fixed? It's completely blocking us from being able to use the plugin.

Thanks!

Error calling method AgentLifeCycleListener.buildStarted for listener com.browserstack.automate.ci.teamcity.BrowserStackLocalAgent: java.util.NoSuchElementException

For version 2.0.0 I observe multiple exceptions in teamcity-agent.log

[2019-10-29 17:15:28,779]   WARN - ildServer.util.EventDispatcher - Error in event handler: Error calling method AgentLifeCycleListener.buildStarted for listener com.browserstack.automate.ci.teamcity.BrowserStackLocalAgent: java.util.NoSuchElementException
Error calling method AgentLifeCycleListener.buildStarted for listener com.browserstack.automate.ci.teamcity.BrowserStackLocalAgent: java.util.NoSuchElementException
	at jetbrains.buildServer.util.EventDispatcher$3.run(EventDispatcher.java:151)
	at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76)
	at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:125)
	at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:75)
	at com.sun.proxy.$Proxy7.buildStarted(Unknown Source)
	at jetbrains.buildServer.agent.impl.buildStages.startStages.FireBuildStartedStage.doBuildState(FireBuildStartedStage.java:20)
	at jetbrains.buildServer.agent.impl.buildStages.startStages.FireEventStageBase.doBuildStage(FireEventStageBase.java:26)
	at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
	at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
	at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:76)
	at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:35)
	at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
	at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:79)
	at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:55)
	at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:312)
	at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:55)
	at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:275)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.NoSuchElementException
	at java.util.ArrayList$Itr.next(ArrayList.java:862)
	at com.browserstack.automate.ci.teamcity.BrowserStackLocalAgent.buildStarted(BrowserStackLocalAgent.java:221)
	at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at jetbrains.buildServer.util.EventDispatcher$3.run(EventDispatcher.java:131)
	... 17 more

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.