Importing Axe DevTools into iOS Unit Tests and UITests - ios

When I import DevTools the app builds fine, but the unit tests give an error when building:
Module compiled with Swift 5.1.2 cannot be imported by the Swift 5.2.4 compiler:
....../Carthage/Build/iOS/Attest.framework/Modules/Attest.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
If I only import it in our unit tests, then the unit tests build fine, but the app gives an error:
Module compiled with Swift 5.1.2 cannot be imported by the Swift 5.2.4 compiler:
......./Carthage/Build/iOS/Attest.framework/Modules/Attest.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
Is manual testing and unit testing in the same build possible?

This is strange to me. Axe DevTools supports manual and automated testing in the same build. The errors described implies to me that there are multiple versions of Axe DevTools somewhere in your project files, and Xcode is doing some weird things to try to import the wrong version. I would recommend first ensuring that there is only one Axe DevTools framework in your project files. You should be able to use the same framework for both manual and unit testing.
If you do in fact only have one framework, then I would recommend looking through Build Settings for the app and unit tests and ensuring that Framework Search Paths is correct.

Related

Why am I unable to import a local project module into a unit test module (Python3.9)?

I have a unit test project in Python 3.9 which is contained within a Visual Studio 2019CE project. This project needs to target Azure Data Factory. To talk to Azure Data Factory there is supporting modules/classes that need to be imported into the unit test module. When importing the supporting objects into a unit test module, the unit test module is no longer discoverable by test explorer.
Import command:
from tools.adf_client import ADFClient
What can I import:
import pyodbc
What is the difference?
pyodbc is installed and tools.adf_client is not, it is a file in the unit test project.
What I have tried:
I tried putting an empty module in the same directory as the unit test module and importing that into the unit test module. The unit test module is still not discoverable.
I have seen examples of people modifying the path. Other people have commented that this is not good practice.
Possible solution:
Creating a setup.py and installing supporting packages into the environment prior to unit-test project execution. This assumes that the problem is that the module is not installed.

Chutzpah & Jasmine tests - upgrade to TFS 2017 has broken tests?

We've been running javascript tests using jasmine and chutzpah for a while now. We just upgraded to TFS 2017. Our C# test run fine, but javascript tests are no longer being found by the TFS builds. (They continue to be discovered and run from Visual Studio.)
There are two suspicious messages in the build log, but I've found no useful information about either of them:
Test run will use DLL(s) built for framework .NETFramework,Version=v4.7.1 and platform X86. Following DLL(s) do not match framework/platform settings.
Chutzpah.VS2012.TestAdapter.dll is built for Framework 4.5.1 and Platform AnyCPU.
I don't know what determines the framework version, and I've read that this is a warning and not necessarily an error. That's backed up by the next error, which implies that the test adapter is being used anyway:
No test is available in c:\agent\_work\2\s\D\W\packages\Chutzpah.4.4.4\tools\Chutzpah.VS2012.TestAdapter.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
Is there something about the TFS 2017 upgrade that I'm missing? Does anyone have any insight into these two error messages or how to further diagnose them?
We recently created a new javascript test project and got this running on tfs 2017 build. Just had to add the chutzpah test runner nuget package to the javascript test project enabled the vstst test runner to discover the tests.
https://www.nuget.org/packages/Chutzpah/

Remove compiler warnings when using F# on .NET core

When I build using .NET core (dotnet build) I get the following kinds of warning:
warning NU1701: Package 'FSharpx.Async 1.13.2' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project.
However, the package does actually work correctly with my project.
How can I fix this warning?

Building project using ANT that contains droidText.jar

I have an Android Project which uses droidText Library.
when I run the project using Eclipse Plugin, build well done.
However when I run it using ANT, the build faild and I got this error:
Pre-Dexing /droidText.0.4.jar -> droidText.0.4-39f8a99da14902e4ed96cdcc8f277d6e.jar
[DEBUG] Skipping watched dependency update for build
I'm prety sure that the problem is related to Android dependency and that's du to uses of duplicated classes in JAR file.
But I don't know how to fix that.
can somebody help me please?
The bug was related to the ANT version, before I had ant 1.7 but after I updated the it with ant 1.8.4. things went ok.

Jenkins build XCode project + run unit test

I been struggling for awhile following every single article, blog post etc that I can find.
I need to setup Jenkins to build my XCode 4.5.2 project and run the unit test... I got the build part working but not the unit test part...
I first tried the Xcode Plugin and then all the different other options to run it from the command line with xcodebuild etc which all fail...
Xcode 4.5.2
Mac OS Lion
Jenkins CI
can anyone give me reference to something that can help me?
Thanks
I've seen a lot of people complaining that XCode 4.5 broke command line unit test execution. Here is one reference post with a possible workaround solution:
Xcode 4.5 command line unit testing
Facebook built a tool that might be helpful: https://github.com/facebook/xctool
If that does not work for you you will have to wait until Apple builds better tools for unit testing and continuous integration.

Resources